AngularJS MVC Example
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
<body ng-app="SampleMVCApp">
<div ng-controller="SampleController">
<h2>{{data.text}}</h2>
<div ng-controller="SampleController2">
<h1>{{header}}</h1>
</div>
</div>
</body>
JavaScript
angular.module("SampleMVCApp", [])
.controller("SampleController", function($scope) {
$scope.data = {};
$scope.data.text = "Hello, AngularJS!";
});
angular.module("SampleMVCApp", [])
.controller("SampleController2", function($scope) {
$scope.data = {};
$scope.header = "test!";
});