W3cubDocs

/Ember.js

Ember.HistoryLocation (protected)

Extends: Ember.Object
Defined in: packages/ember-routing/lib/location/history_location.js:26
Module: ember

Ember.HistoryLocation implements the location API using the browser's history.pushState API.

Using HistoryLocation results in URLs that are indistinguishable from a standard URL. This relies upon the browser's history API.

Example:

App.Router.map(function() {
  this.route('posts', function() {
    this.route('new');
  });
});

App.Router.reopen({
  location: 'history'
});

This will result in a posts.new url of /posts/new.

Keep in mind that your server must serve the Ember app at all the routes you define.

Methods

Properties

Events

No documented items

© 2017 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://emberjs.com/api/ember/2.15/classes/Ember.HistoryLocation