Skip to content

Instantly share code, notes, and snippets.

@Sunil02kumar
Created September 3, 2018 17:31
Show Gist options
  • Select an option

  • Save Sunil02kumar/31368519b3608345807bdfa2260f2a51 to your computer and use it in GitHub Desktop.

Select an option

Save Sunil02kumar/31368519b3608345807bdfa2260f2a51 to your computer and use it in GitHub Desktop.
lightning:isUrlAddressable Interface: Way to get URL parameters in Lightning Components
<aura:component implements="lightning:isUrlAddressable,force:appHostable" access="global">
<aura:attribute name="urlParam" type="string"/>
<div class="slds-card">
If you implements "lightning:isUrlAddressable" interface, then by
using v.pageReference,you can get URL params.
<div class="slds-box">
Account name from URL parameter: <b>{!v.pageReference.state.accname}</b>
</div>
</div>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment