NoneLocation
Ember.NoneLocation Class
PRIVATE
Extends: Ember.Object
Defined in: packages/ember-routing/lib/location/none_location.js:13
Module: ember-routing
Ember.NoneLocation does not interact with the browser. It is useful for testing, or when you need to manage state with your Router, but temporarily don't want it to muck with the URL (for example when you embed your application in a larger page).
formatURL (url) String
private
Given a URL, formats it to be placed into the page as part of an element's href
attribute.
This is used, for example, when using the {{action}} helper to generate a URL based on an event.
Parameters:
-
url
String
Returns:
-
String
- url
getURLString
private
Returns the current path without rootURL
.
Returns:
-
String
- path
handleURL (callback) private
Sets the path and calls the updateURL
callback.
Parameters:
-
callback
Function
onUpdateURL (callback) private
Register a callback to be invoked when the path changes. These callbacks will execute when the user presses the back or forward button, but not after setURL
is invoked.
Parameters:
-
callback
Function
setURL (path) private
Set the path and remembers what was set. Using this method to change the path will not invoke the updateURL
callback.
Parameters:
-
path
String
rootURLprivate
Will be pre-pended to path.
Default: '/'
© 2017 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://emberjs.com/api/classes/Ember.NoneLocation.html