I've a SPA.html [Single Page Application].
<!DOCTYPE html>
<html data-ng-app="demoApp">
<head>
<script src="angular.min.js"></script>
<script src = "angular-route.js"> </script>
<script>
(function () {
var demoApp = angular.module('demoApp',['ngRoute']);
demoApp.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/index',
{
controller : 'SimpleController',
templateUrl : 'Partials/index.html'
})
.when('/fixed',
{
controller : 'SimpleController',
templateUrl : 'Partials/fixed.html'
})
.when('/calculated',
{
controller : 'SimpleController',
templateUrl : 'Partials/calculated.html'
})
.otherwise({redirectTo : '/index'});
}]);
}());
</script>
</head>
<body>
Click : <input ng-model="name"/> {{name}}
<a href="#/index">index </a>
<a href="#/fixed">fixed </a>
<a href="#/calculated">calculated </a>
<br />
Placeholder
<div ng-view></div>
</body>
</html>
When clicking on any of the links a partial html gets loaded in view. Say my index.html under Partial folder is :
<script src="angular.min.js"> </script>
<div ng-app="">
<div class="container" >
<input type="text" ng-model="name" />
Label: : {{name}} <br>
</div>
</div>
So, clicking on index loads the above partial but instead of databinding I get {{name}} on web page but when I directly open index.html it works fine.
What am I missing on? I've copied angular.min.js in Partials.