Lightning Web Components : Use LWC in Aura Components | Handle LWC Event in Aura Components #LWC

Lightning Web Components : Use LWC in Aura Components | Handle LWC Event in Aura Components #LWC

SFDC Panther+

5 лет назад

12,303 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@rajashekertummala4684
@rajashekertummala4684 - 15.02.2023 08:26

have you got any solution on the event handler in aura component?

Ответить
@manj3125
@manj3125 - 12.05.2020 08:01

Hey, do you have an example of firing an event from Aura to LWC using auraPubsub module? I am not finding anything with respect to that anywhere ..not even in developer guide

Ответить
@akashdeep8229
@akashdeep8229 - 10.07.2019 21:06

You should use like the below code for fetching data passed from LWC event:
LWC::
const testmsg= 'I am in next loop';
const nextEvent = new CustomEvent('next',{detail:{testmsg}});

Aura controller::
var details = event.getParam('testmsg');

Ответить
@baswarajpatil8718
@baswarajpatil8718 - 09.01.2019 07:43

The event param should not be const message variable name, it should be "detail", as you are passing message to detail as a event param.

Ответить