0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

lightning:navigationを使った画面遷移

Last updated at Posted at 2020-04-22

遷移先のコンポーネントに lightning:isUrlAddressable を追加する

<aura:component implements="lightning:isUrlAddressable,force:appHostable" access="global">

遷移元ではlightning:navigationを使う

cmp

<aura:component implements="force:appHostable" access="global">    
    <lightning:navigation aura:id="navService"/>
     <lightning:button variant="brand" label="navi" onclick="{! c.handleUrl }" class="make_payment" />
</aura:component>

js

handleUrl : function(component, event, helper) {        
        var pageReference= component.find("navService");
        var pageReferenceNav={  
        "type": "standard__component",
                "attributes": {
                "componentName": "c__FolderManager"    
            },    
            "state": {
                "myAttr": "attrValue"    
            }
        } ; 
        pageReference.navigate(pageReferenceNav);        
    },
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?