Jarwis2014-11-28 07:06:30
Jarwis, 2014-11-28 07:06:30

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:

                '/', {
                    controller: 'pageController',
                    templateUrl: '/Templates/PageTemplate'
                '/About', {
                    controller: 'pageController',
                    templateUrl: '/Templates/PageTemplate'

But for some reason when I click on the link:
<li><a href="/">Главная</a></li>
 <li><a href="/About">О проекте</a></li>

the page is being updated.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Sergey Romanov, 2014-11-28

Forgot hash and url become url. If you want without a hash, then you need to add it to config

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question