16 lines
1.3 KiB
HTML
Executable file
16 lines
1.3 KiB
HTML
Executable file
<a href="http://github.com/angular/angular.js/edit/master/docs/content/error/location/ihshprfx.ngdoc" class="improve-docs btn btn-primary"><i class="icon-edit"> </i> Improve this doc</a><h1><code ng:non-bindable="">Missing Hash Prefix</code>
|
|
<div><span class="hint">error in component <code ng:non-bindable="">$location</code>
|
|
</span>
|
|
</div>
|
|
</h1>
|
|
<div><pre class="minerr-errmsg" error-display="Invalid url "{0}", missing hash prefix "{1}".">Invalid url "{0}", missing hash prefix "{1}".</pre>
|
|
<h2 id="Description">Description</h2>
|
|
<div class="description"><div class="-location-page -location-ihshprfx-page"><p>This error occurs when <a href="api/ng.$location"><code>$location</code></a> service is configured to use a hash prefix but this prefix was not present in a url that the <code>$location</code> service was asked to parse.</p>
|
|
<p>For example if you configure <code>$location</code> service with prefix <code>'!'</code>:</p>
|
|
<pre><code>myApp.config(function($locationProvider) {
|
|
$locationProvider.prefix('!');
|
|
});</code></pre>
|
|
<p>If you enter the app at url <code>http:/myapp.com/#/myView</code> this error will be throw.</p>
|
|
<p>The correct url for this configuration is <code>http:/myapp.com/#!/myView</code> (note the <code>'!'</code> after <code>'#'</code> symbol).</p>
|
|
</div></div>
|
|
</div>
|