-
-
Save frontendloader/34bfebf06c4fa3b61036 to your computer and use it in GitHub Desktop.
Lightning navigation example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component implements="c:view"> | |
<div>Using view 'bar': {!v.message}</div> | |
<ui:button label="Navigate to bar" press="{!c.navTofoo}"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
navToFoo : function(component, event, helper) { | |
$A.get("e.c:navigateToView").setParams({view: "foo"}).fire(); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component implements="c:view"> | |
<div>Using view 'foo': {!v.message}</div> | |
<ui:button label="Navigate to bar" press="{!c.navToBar}"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
navToBar : function(component, event, helper) { | |
$A.get("e.c:navigateToView").setParams({view: "bar"}).fire(); | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:interface description="view interface"> | |
<aura:registerEvent name="navigateEvent" type="c:navigateToView"/> | |
<aura:attribute name="message" type="String"/> | |
</aura:interface> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you post the navcontainer controller code?