function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
兵兵 毛兵兵 毛 

Uncaught error in $ : Unknown component

I'm using lightning component and I have create two component like below.

<aura:component implements='force:appHostable'> <ui:button aura:id="normal" label="Go to SampleView2" press="{!c.pressButton}"/> </aura:component>

({ pressButton: function(component, event, helper) { var evt = $A.get("e.force:navigateToComponent"); evt.setParams({ componentDef: "c:navigateSampleView2", componentAttributes: { whom: "Lightning" } });; } })

<aura:component> <aura:attribute name="whom" type="String" default="world"/> Hello {!v.whom}! </aura:component>

Now, what I want to do is that navigate from navigateSampleView1 to navigateSampleView2, but the error is happened, please help me out!!
The error is "Uncaught error in $ : Unknown component: markup://c:navigateSampleView2"
兵兵 毛兵兵 毛
I have got the answer from Salesforce. It's because force:navigateToComponent is not supported by official. However, I can not find another event like this to navigate between component. If anyone got it, please give me a reply.
Vandana Rattan 4Vandana Rattan 4

I am facing a similar issue. Were you able to find anyworkaround for the issue?

兵兵 毛兵兵 毛
Hi, Vandana
I haven't found anyworkaroud about this problem. I just give up using Lighting component because it is not released officially. If you find anyworkaround, please give me a reply.

Ashish DeoAshish Deo
Hey Guys.. I am facing same problem.. any workaround?
Rowan  ChristmasRowan Christmas
I've looked into this a lot. The best post is this:

My current plan is that I'm taking a harder look at my UX and designing with components that do less but fit together better in order to fit better with the app builder. Depending on your use case maybe there is a different solution as well..
Vandana Rattan 4Vandana Rattan 4
Thank you for your email. I am out of the office for maternity leave. If you need any Salesforce related assistance, kindly contact Matthew Sutton ( Best Regards, Vandana This email (including any attachments) is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return email. Please then delete both emails and do not disclose their contents to any person. We believe, but do not warrant, that this email and any attachments are virus free. You should take full responsibility for virus checking.  Engineers Australia reserves the right to monitor all email communications through its networks. If the content of this email is personal or unconnected with our business, we accept no liability or responsibility for it.
Mohith Kumar ShrivastavaMohith Kumar Shrivastava
#safe Harbour Summer 16 will address this I believe but a big safe harbour .For now the only work around is one mentioned in stackexchange link