Activity Forums Salesforce® Discussions How to pass data from one component to another in Salesforce lightning?

  • Suraj

    Member
    May 29, 2017 at 1:11 pm

    Hi Tanu,

    In order to pass data from one lightning Component to another Lightning Component You need to use Event.For e.g We have 2 component 1st take input From User and 2nd to Display value,So in this Scenario We need to pass data from 1st Component to 2nd Component.

    1. Create an Event and attribute to store value and also create an attribute in 2nd component to store the catched value.
    2. Register 1st Component to Event And Fire Event From JavascriptController
    3. Handle the event in 2nd Component Using aura:handler and set value in attribute(2nd component).

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos