You need to sign in to do that
Don't have an account?

call a lightning component from a custom button
I am not an expert in lightning components, so I had to post this question.
In lightning, I have an app page. There a is a primarycomponent kept on the lightning page.
PrimaryComponent.cmp
----------------------------
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable"
access="global" >
<lightning:button label="Neutral"
title="Neutral action"
onclick="{!c.handleF1Comp}"/>
</aura:component/>
Now I have another component say F1Comp.cmp
<aura:component implements="flexipage:availableForAllPageTypes"
access="global" >
<h1> I am F1 Comp </h1>
</aura:component/>
My requirement is when I click the button In primarycomponentit should call the f1Comp.
How to achieve this?
Please eloborate and suggest approaches.
Thanks
shwet
In lightning, I have an app page. There a is a primarycomponent kept on the lightning page.
PrimaryComponent.cmp
----------------------------
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable"
access="global" >
<lightning:button label="Neutral"
title="Neutral action"
onclick="{!c.handleF1Comp}"/>
</aura:component/>
Now I have another component say F1Comp.cmp
<aura:component implements="flexipage:availableForAllPageTypes"
access="global" >
<h1> I am F1 Comp </h1>
</aura:component/>
My requirement is when I click the button In primarycomponentit should call the f1Comp.
How to achieve this?
Please eloborate and suggest approaches.
Thanks
shwet
Refer this link
https://developer.salesforce.com/docs/component-library/bundle/lightning:isUrlAddressable/documentation
F1Comp.cmp
_____________________________________________________
https://www.mcdvoice.onl
Try this one out:
PrimaryComponent.cmp-->
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable"
access="global" >
<lightning:button label="Neutral"
title="Neutral action"
onclick="{!c.handleF1Comp}"/>
</aura:component/>
PrimaryComponentController.js--->
({ handleF1Comp:function (c ,e, h) {
var evnt = $A.get("e.force:navigateToComponent");
evnt.setParams({
componentDef : "c:F1Comp",
componentAttributes: { }
});
evnt.fire();
}
})
F1Comp.cmp------>
<aura:component implements="flexipage:availableForAllPageTypes"
access="global" >
<h1> I am F1 Comp </h1>
</aura:component/>
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi
access="global" >
<lightning:button label="Neutral"
title="Neutral action"
onclick="{!c.handleF1Comp}"/>
</aura:component/>
PrimaryComponentController.js--->
({ handleF1Comp:function (c ,e, h) {
var evnt = $A.get("e.force:navigateToComponent");
evnt.setParams({
componentDef : "c:F1Comp",
componentAttributes: { }
});
Please try this!!tellthebell (https://surveyforcustomers.com/tellthebell-com/)
04 access="global" >
05 <aura:attribute name="pageReference" type="Object"/>
06 <aura:handler name="init" value="{! this }" action="{! c.init }"/>
07<lightning:navigation aura:id="navService"/>
08<lightning:button label="Navigate" onclick="{!c.handleClick}"/>
09</aura:component/>
Webmail (http://www-hotmail-com.email/)
access="global" >
<lightning:button label="Neutral"
title="Neutral action"
onclick="{!c.handleF1Comp}"/>
</aura:component/>
PrimaryComponentController.js--->
({ handleF1Comp:function (c ,e, h) {
var evnt = $A.get("e.force:navigateToComponent");
evnt.setParams({
componentDef : "c:F1Comp",
componentAttributes: { }
});
i have use on : hotmail.com login (https://hotmail-loign.com/www-hotmail-com/)
PrimaryComponent.cmp-->
<aura:component implements="flexipage:availableForAllPageTypes,force:appHostable"
access="global" >
<lightning:button label="Neutral"
title="Neutral action"
onclick="{!c.handleF1Comp}"/>
</aura:component/>
ePayItOnline (https://ranvex.com/)
thanks i found a solution
https://www.tcswebmail.info/ https://www.dadeschools.one/ https://www.upsers.fyi/
https://howtousespotify.com/
It is recognized for its signature burger, “The Whopper,” its instantly recognizable logo, and locations all over the USA and beyond, it is a big part of American restaurant culture.
http://logina2z.com/how-to-colcampus-login-portal/
hello friends,
State Auto Connect Login – Here in this article, you will get to learn about how to login into the State Auto Connect Login portal.
So please read this article, at last, and learn about the State Auto Connect and various other proceedings.
Let’s get started…
http://logina2z.com/state-auto-connect-login/
hello friends,
Wright – Patt Credit Union Login – Here in this article, you will get to learn about how to login into the Wright – Patt Credit Union Login Portal.
So please read this article, at last, and learn about the Wright – Patt Credit Union Login and various other proceedings.
Let’s get started…
http://logina2z.com/wright-patt-credit-union-login/
hello friends,
City Credit Union Login – Here in this article, you will learn how to log into the City Credit Union Login portal.
So please read this article, at last, and learn about the City Credit Union Login and various other proceedings.
Let’s get started…
http://logina2z.com/city-credit-union-login/
Welcome to another helpful informatic article about the aaa of Alabama membership login
In this article, we will talk about the aaa of Alabama membership login portal’s login requirements, a step-wise guide, and basic information about the portal.
You probably know that AAA offers outstanding roadside assistance to AAA Members in a jam. But did you know since its start, AAA has advocated for safe, efficient highways and has offered services to make car ownership and travel more enjoyable?
http://logina2z.com/aaa-alabama-membership-login/