Class Ember.Location

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.

Show:

Module: ember
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'});
Module: ember
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'
});