Skip to content

Instantly share code, notes, and snippets.

@sfcure
Last active April 2, 2019 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sfcure/764b7459afa7af4d5a6d57c65c31c071 to your computer and use it in GitHub Desktop.
Save sfcure/764b7459afa7af4d5a6d57c65c31c071 to your computer and use it in GitHub Desktop.
<aura:component implements="force:appHostable,lightning:isUrlAddressable" >
<aura:attribute name="recordId"
type="String"
description="ID of the record."/>
<aura:handler name="init"
value="this"
action="{!c.doInit}"/>
</aura:component>
({
doInit : function(component, event, helper) {
component.set('v.recordId', component.get("v.pageReference").state.id);
console.log(component.get('v.recordId'));
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment