Class HashLocation
protected| Extends: | EmberObject |
|---|---|
| Defined in: | packages/@ember/-internals/routing/lib/location/hash_location.ts:11 |
| Module: | @ember/routing |
import HashLocation from '@ember/routing/hash-location';
HashLocation implements the location API using the browser's hash. At present, it relies on a hashchange event existing in the browser.
Using HashLocation results in URLs with a # (hash sign) separating the server side URL portion of the URL from the portion that is used by Ember.
Example:
app/router.jsRouter.map(function() {
this.route('posts', function() {
this.route('new');
});
});
Router.reopen({
location: 'hash'
}); This will result in a posts.new url of /#/posts/new.
Methods
- addObserver
- cacheFor
- decrementProperty
- destroy
- get
- getProperties
- incrementProperty
- init
- notifyPropertyChange
- removeObserver
- set
- setProperties
- toString
- toggleProperty
- willDestroy
Properties
Events
No documented items
© 2020 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember/3.25/classes/HashLocation