I have a community page where I need to navigate from one aura component to another (on the same page, no full page redraw). I start in "FirstComponent.cmp" and click a button which should result in displaying SecondComponent.cmp
FirstComponent.cmp
<aura:component controller="FMZ_SuiteServices"
implements="flexipage:availableForRecordHome,flexipage:availableForAllPageTypes,force:hasRecordId,force:appHostable,forceCommunity:availableForAllPageTypes"
access="global">
<lightning:navigation aura:id="navService"/>
<lightning:button label="Add Tour" onclick="{!c.handleAddTour}"></lightning:button>
</aura>
firstComponentController.js (segment)
handleAddTour: function (component, event, helper) {
component.find("navService").navigate({
type: 'standard__component',
attributes: {
componentName: "c__SecondComponent"
},
state: {}
});
},
SecondComponent.cmp
<aura:component controller="FMZ_TourServices"
implements="flexipage:availableForAllPageTypes,force:hasRecordId,force:appHostable,force:lightningQuickAction,forceCommunity:availableForAllPageTypes,lightning:isUrlAddressable"
access="global">Welcome To The Second Component</aura>
Would appreciate any help with what I am missing! TIA