Class Ember.Location
Defined in:
packages/ember-routing/lib/location/api.js:24
Module:
ember
Ember.Location returns an instance of the correct implementation of
the location
API.
You can pass it a implementation
('hash', 'history', 'none') to force a
particular implementation.
create (options) Object
Module:
ember
Defined in packages/ember-routing/lib/location/api.js:36
- options
- Object
- returns
- Object
- an instance of an implementation of the `location` API
Create an instance of a an implementation of the location
API. Requires
an options object with an implementation
property.
Example
1 2 3 |
var hashLocation = Ember.Location.create({implementation: 'hash'}); var historyLocation = Ember.Location.create({implementation: 'history'}); var noneLocation = Ember.Location.create({implementation: 'none'}); |
registerImplementation (name, implementation)
Module:
ember
Defined in packages/ember-routing/lib/location/api.js:62
- name
- String
- implementation
- Object
- of the `location` API
Registers a class that implements the location
API with an implementation
name. This implementation name can then be specified by the location property on
the application's router class.
Example
1 2 3 4 5 |
Ember.Location.registerImplementation('history', Ember.HistoryLocation); App.Router.reopen({ location: 'history' }); |