<aura:component implements="force:appHostable">
    <aura:attribute name="accountid" type="String" />
    <ui:inputNumber aura:id="test1" label="Name" />
    <ui:button label="Navigate" press="{!c.Naviagte}" />
    Add: function(component, event, helper) {
        var get_name = component.find("testt1").get("v.value");
        var evt = $A.get("e.force:navigateToComponent");
            componentDef: "c:Component2",
            componentAttributes: {
                accountid: get_name


<aura:component implements="force:appHostable">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />


doInit: function(component, event, helper) {
    var ResultValue = event.getParam("accountid");
    // it navigate fine but i am not able to get pass attribute value here
  • Hi pankaj, welcome to SFSE! Please take the time to visit the Help center and read How do I ask a good question. Please don't just do a "code dump" on us. Instead, tell us where you're stuck and what you're having trouble with, including what you've tried that didn't work. Once you do, the more likely it is that someone will respond to your question with an answer you'll find helpful.
    – crmprogdev
    Jun 18, 2016 at 12:50
  • thanks sir,but i try to get passed attribute value from component one in component2 in many way i am not able to get it. Jun 18, 2016 at 13:21
  • possible duplicate of http://salesforce.stackexchange.com/q/66954/20830
    – Praveen
    Jun 18, 2016 at 15:22
  • e.force:navigateToComponent is an undocument event which is not officially supported by Salesforce.Use $A.createComponent to create components as given in the above link's answer
    – Praveen
    Jun 18, 2016 at 15:25
  • thanks praveen sir, i try your given link but still my problem not solved Jun 18, 2016 at 15:47