Invalid url "{0}", missing hash prefix "{1}".
This error occurs when $location service is configured to use a hash prefix but this prefix was not present in a url that the $location
service was asked to parse.
For example if you configure $location
service with prefix '!'
:
myApp.config(function($locationProvider) {
$locationProvider.hashPrefix('!');
});
If you enter the app at url http://myapp.com/#/myView
this error will be thrown.
The correct url for this configuration is http://myapp.com/#!/myView
(note the '!'
after '#'
symbol).