[SalesForce] Lightning Tab – Pass parameters

I am trying to navigate to a Newly setup tab using a lightning component. Component is configured to be used with RecordHome and contains recordId attribute. When navigating to the component, I would like to pass-in a parameter. I tried passing using using URL while firing e.force:navigateToURL event – but it seems like that's NOT going to work. Any help is greatly appreciated.

Thanks in advance

Best Answer

There is an event called force:navigateToComponent. This might help you. But it does not have any documentation.

For example:-

navigateToRollCall : function(component, event, helper) {
var evt = $A.get("e.force:navigateToComponent");
    evt.setParams({
        componentDef: "c:AttendanceRollCall",
        componentAttributes: {
            programId: component.get("v.program.Id")
        }
    });
    evt.fire();    
}
Related Topic