JSFiddle - React, Tailwind, and code Playground
by Yonathan Benitah
HTML
<script src="https://code.angularjs.org/1.4.3/angular.min.js"></script>
<div ng-controller="myController">
<button ng-click="location = '/test'">change location to /test</button>
<button ng-click="location = '/coucou'">change location to /coucou</button>
<div ng-switch on="location">
<div ng-switch-when="/test" ng-include="'test'"></div>
<div ng-switch-when="/coucou" ng-include="'coucou'"></div>
</div>
</div>
<script type="text/ng-template" id="test">
This is a test page
</script>
<script type="text/ng-template" id="coucou">
this is a coucou page
</script>
JavaScript
var app = angular.module('myApp', []);
function myController($scope) {
$scope.location = '/test';
}