JSFiddle - React, Tailwind, and code Playground
by dzul1983
HTML
<div ng-app="myApp" ng-controller="Ctrl1 as ctrl1">
{{ctrl1.name}}
<div ng-controller="Ctrl2 as ctrl2">
{{ctrl2.name}}
<div ng-controller="Ctrl3 as ctrl3">
{{ctrl3.name}}
</div>
</div>
</div>
CSS
div {
padding: 15px;
}
JavaScript
angular.module('myApp', [])
.controller('Ctrl1', [function() {
this.name = "Controller 1";
console.log('Controller 1 initialized!');
}])
.controller('Ctrl2', [function() {
this.name = "Controller 2";
console.log('Controller 2 initialized!');
}])
.controller('Ctrl3', [function() {
this.name = "Controller 3";
console.log('Controller 3 initialized!');
}]);