Answer the question
In order to leave comments, you need to log in
AngularJS NgRoute - why does it refresh the page?
I'm trying to figure out angular.js and I'm having a problem with ng-route. I configure $routeProvider:
$routeProvider.when(
'/', {
controller: 'pageController',
templateUrl: '/Templates/PageTemplate'
})
.when(
'/About', {
controller: 'pageController',
templateUrl: '/Templates/PageTemplate'
});
<li><a href="/">Главная</a></li>
<li><a href="/About">О проекте</a></li>
Answer the question
In order to leave comments, you need to log in
Need
Forgot hash and url become url. If you want without a hash, then you need to add it to config$locationProvider.html5Mode(true);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question