I have created a lightning component onclick button call a js function. Js function is there.
callAuthComponent : function(component, event, helper){
console.log('call......');
var evt = $A.get("e.force:navigateToComponent");
evt.setParams({
componentDef:"c:getAuthComponent",
});
evt.fire();
}
But get the following error:
This page has an error. You might just need to refresh it. Action failed: c:LinkedinSalesforce$controller$callAuthComponent [Cannot read property 'setParams' of undefined] Failing descriptor: {c:LinkedinSalesforce$controller$callAuthComponent}
Why do I get this error? How can I fix it?
salesforce1-app
. Are you experiencing this issue in a component used in Salesforce mobile? If no, can you edit your question to specify where you are surfacing this component?