Skip to main content La Trailblazer Community non sarà disponibile dal 1/2/2025 al 2/2/2025. Pianifica le tue attività di conseguenza.
I have built a Lightning app containing a login form component. Now when user clicks on Login button I have to take the user to Registration Page another component. How can I achieve this? I went through Lightning documemntation and came across force:navigateToURL. But what should I specify as URL for the Registration Page?

Or will I have to create a separate app containing Registration page? Kindly help.

Regards
8 risposte
  1. 10 mar 2015, 04:34
    Thanks Gaurav,

    I had to implement it by creating event handler, registering and then firing the event.
  2. 4 set 2015, 05:48
    @VandanaRattan4

    Hi Vandana,

    Could you please send me the flow of the execution that what you did for force:navigateToURL.

    I have stucked in the same place...

    Please guide me...
  3. 23 giu 2015, 00:25
    Hi Anshuman,

    Apologies for a delayed response. You would have to make your attributes Application level instead of component level. I used this strategy to pass attributes from 1 component to other. But now strangely e.force:navigateToComponent is no longer working.

    Regards,

    Vandana

     
  4. 18 apr 2015, 07:26
    Hi,

     I am able to navigate to the new component by using "e.force:navigateToComponent" but attributes are not getting passed. Please suggest.

    Regards

     
  5. 23 feb 2015, 12:26
    I stand corrected - you would do this using the  e.force:navigateToComponent method. Try this

    In your markup

     

    <ui:button label="ATTENDANCE" press="{!c.navigateToRollCall}"/>

    In your controller, do something like

     

    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();

    }

    If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

    Gaurav Kheterpal

    Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker

     
  6. 20 feb 2015, 10:10
    You don't need to create separate Lightning apps for this. Just use

     

    sforce.one.navigateToURL('Your component URL here');

    to redirect to the approprirate place.

    If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.

    Gaurav Kheterpal

    Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker

     
0/9000