Indicates that the hash part of the URL has
changed.
This event is automatically fired when the hash part of the URL has changed, such
as when a new location token is appended to the hash. The
aura:locationChange event is handled by a client-side controller. A
component can have only one
<aura:handler
event="aura:locationChange"> tag to handle this event.
<aura:handler event="aura:locationChange" action="{!c.update}"/>
This
client-side controller handles the
aura:locationChange
event.
({
update : function (component, event, helper) {
var loc = event.getParam("token");
}
})
The
aura:locationChange handler contains these
required attributes.
event |
String |
The name of the event, which must be set to aura:locationChange. |
action |
Object |
The client-side controller action that handles the event. |
The
aura:locationChange event contains
these attributes.
token |
String |
The hash part of the URL. |
querystring |
Object |
The query string portion of the hash. |