Activity Forums Salesforce® Discussions Where a link may open on lightning app as its a one page app?

  • Where a link may open on lightning app as its a one page app?

    Posted by Tanu on July 14, 2016 at 4:21 PM

    Where may a link open on the lightning app as its a one-page app as it needs to be redirected to another page or replace all existing component of a page?

    Explain it.

    Sourabh replied 10 years ago 2 Members · 1 Reply
  • 1 Reply
  • Sourabh

    Member
    July 15, 2016 at 12:30 PM

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

    }

     

    Thankyou

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Skip to toolbar