Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I have setup a new Angular project using yeoman. Angular version is 1.6.0. Project setup was successful but I have been facing an issue with routing

Task runner - Grunt

When I run the project in local my local page will load with URL

http://localhost:9000/#!/

I was expecting http://localhost:9000/#/

When clicked on About link browser is routed to

http://localhost:9000/#!/%23%2Fabout

Expectation: http://localhost:9000/#/about

When I click home link browser is routed to

http://localhost:9000/#!/%23%2F

Expectation: http://localhost:9000/#/

What might be the issue? I have no such issues in my other system where I'm using AngularJS 1.5.8.

share|improve this question
up vote 3 down vote accepted

I got resolved with following code.You can write in your app.js file

 $locationProvider.hashPrefix('');
share|improve this answer
    
you can go through the following link: – Shiva Dec 14 '16 at 12:26
    
You can go through this link github.com/yeoman/generator-angular/issues/1380 – Shiva Dec 14 '16 at 12:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.