Angular: Empty Fiddle
http://angularjs.org/
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<div ng-controller="MyController">
<div ng-switch on="component">
<hello ng-switch-when="hello">
<goodbye ng-switch-when="goodbye">
Lorem Ipsum.........
</goodbye>
</hello>
</div>
</div>
JavaScript
angular
.module('myApp', [])
.component('hello', {
template: '<h1>Hello, <ng-transclude></ng-transclude>!</h1>',
transclude: true
})
.component('goodbye', {
template: '<h1>Goodbye, <ng-transclude></ng-transclude>!</h1>',
transclude: true
})
.controller('MyController', ['$scope', function($scope) {
$scope.component = 'hello';
}]);