JSFiddle - React, Tailwind, and code Playground
by manikantag
HTML
<div ng-app="" ng-controller="TestCtrl">
<div class="highlight">Scope:{{store}}</div>
<label><input type="radio" ng-model="framework" value="angularjs" name="framework" /> AngularJS</label>
<label><input type="radio" ng-model="framework" value="backbonejs" name="framework" /> BackboneJS</label>
<div ng-switch="framework">
<div ng-switch-when="angularjs" ng-include src="'tmpl1'"></div>
<div ng-switch-when="backbonejs" ng-include src="'tmpl2'"></div>
</div>
</div>
<script type="text/ng-template" id="tmpl1">
AngularJS version: <input type="text" ng-model="store.angularjs.version" />
</script>
<script type="text/ng-template" id="tmpl2">
BackboneJS version: <input type="text" ng-model="store.backbonejs.version" />
</script>
CSS
.highlight {
border: 1px solid gray;
background-color: lightyellow;
}
JavaScript
function TestCtrl($scope) {
$scope.store = {};
$scope.arr = [1, 2, 3, 4, 5];
}