Thursday, 25 June 2015

angular route



To use hashbang urls   $locationProvider.hashPrefix('!');
To use push state   $locationProvider.html5Mode(true);


With push state, your url will be "http://xxxx/#about" if you send this url to other people they also can see the about page, and you also can fresh without any problems.

Without push state,  the url will be "http://xxxx/about" you can only get the url went you route from index page of this application. You can't refresh and send it to other people. you will get 404 which is send from your web container (nodejs.).









No comments:

Post a comment