I'm having a massive problem with AngularJS routing.
Up until recently everything has been fine with the following route:
$routeProvider.when('/album/:albumId', {
controller: 'albumPageController',
templateUrl: 'views/album.html'
});
and using the href:
<a href="/#/album/{{album.id}}">Link</a>
However, now all of the slashes are being encoded into %2F
.
So when I click the link, or type localhost:8000/#/album/1
into the browser, the URL is changed to:
http://localhost:8000/#%2Falbum%2F1
I've tried several things to correct this:
Using ng-href instead of href,
Not using the first / (ie href="#/album/{{album.id}}"
)
Running the app in Homestead localhost (Laravel's linux vagrant machine) instead of localhost on Windows 10
Any help would be much appreciated!
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…