<!DOCTYPE html>
<html lang="en">
<head>
<title>Angular Demo</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular-route.min.js"></script>
<script >
var myApp = angular.module("AngularApp",['ngRoute']);
myApp.config(['$routeProvider',
function ($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'test.html',
controller: 'testCtrl'
})
}
]);
myApp.controller("testCtrl", function($scope){
$scope.model = {
text:"This is the example of ng-view in angular js"
}
});
</script>
</head>
<body ng-app="AngularApp">
<ng-view></ng-view>
</body>
</html>
// Code goes here
/* Styles go here */
<h1>{{model.text}}</h1>