-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Routing is messed - Wrong links #1387
Comments
The "!" is a recent change in the angular's routing component. Not really sure why they did that, but I noticed that when I upgraded angular on my projects, the routing was all messed up. So my guess is that the yo generator is not updated with the latest angular routing system. |
Look into the following issue: #1380 You just need to replace the links to the following:
the |
Same problem on my side. |
This is because of changes in AngularJS 1.6.0. To restore previous behavior : app.config(['$locationProvider', function($locationProvider) {
$locationProvider.hashPrefix('');
}]); see: http://stackoverflow.com/questions/41211875/angularjs-1-6-0-latest-now-routes-not-working |
I had the same problem, but is easily fix with the ng-href="#!/.... |
@samir-plusb Thanks man, this works. |
Well, right out of installation, I run
yo angular
choose angular-route and angular-resource, everything installs fine. I rungrunt
and it also installs just fine. I then rungrunt serve
, the web server is started normally but the routing doesn't work.I click on 'about' and nothing happens, but the controller and the view are there. I get to the index.html and notice that the links are wrong. It is just
<li><a ng-href="#/about">About</a></li>
. When I click nothing happens. Adding a '!' after the '#' it works just fine.I'm not the biggest expert in angularjs around, in fact testing this generator for study purposes, so, there is indeed this issue or am I missing something?
The text was updated successfully, but these errors were encountered: