i have a problem with my code with ng-route. Adress in browser is changing but on my page all elements are still the same. Here is my code:
var app=angular.module('mainApp',['ngRoute']);
app.config('$routeProvider', function($routeProvider){
$routeProvider
.when('/',{
templateUrl: 'home.html'
})
.when('/about', {
templateUrl: 'about.html'
})
.when('/contact', {
templateUrl: 'contact.html'
})
.otherwise({
redirectTo: '/'
});
});
app.controller('mainCtrl',function($scope){
});
<div ng-controller="mainCtrl">
<div>
<nav>
<ul>
<li><a href="#/">Home</a></li>
<li><a href="#/about">About us</a></li>
<li><a href="#/contact">Contact</a></li>
</ul>
</nav>
</div>
<br/>
<div ng-view ></div>
</div>
i have three subsite with simple paragraphs (home, about and contact. html).
Can you help me?