This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Internal Url inconsistency with ng-href and location.path #6795
Open
Description
I find myself having to write urls in two different manners
ng-href="#something" and location.path("something")
Since I have a urlService in my app to generate urls for various things, this means I have to scatter .substring(1) thruout my code to deal with location.path() like this location.path(urlService.createFoo(args).substring(1)) so that I can use
<a ng-href=urlService(createFoo(args))>Link text</a>
It would be nice if they both took the same string and since ng-href has to have the # so that you could actually leave the page with a /something, it makes sense to have location.path ignore the first character if it is a '#' character