Parent: ember
Ember.Location returns an instance of the correct implementation of the location API.
You can pass an implementation name (hash, history, none, auto) to force a particular implementation to be used in your application.
See Ember.Location.HashLocation. See Ember.Location.HistoryLocation. See Ember.Location.NoneLocation. See Ember.Location.AutoLocation.
Each location implementation must provide the following methods:
url to be placed into href attribute.cancelRouterSetup property on itself to false.Calling setURL or replaceURL will not trigger onUpdateURL callbacks.
Ember scans app/locations/* for extending the Location API.
Example:
import Ember from 'ember';
const { HistoryLocation } = Ember;
export default class MyHistory {
implementation: 'my-custom-history',
constructor() {
this._history = HistoryLocation.create(...arguments);
}
create() {
return new this(...arguments);
}
pushState(path) {
this._history.pushState(path);
}
}
© 2017 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://emberjs.com/api/ember/2.15/modules/ember-routing