HTML
<template>
<c-child-component onchildbuttonclick={handleChildButtonClick}></c-child-component>
<template if:true={buttonClicked}>
<p>The child button was clicked.</p>
</template>
</template>
Java Script
import { LightningElement, track } from 'lwc';
export default class ParentComponent extends LightningElement {
@track buttonClicked = false;
handleChildButtonClick() {
this.buttonClicked = true;
}
}
Video
Video does not exists.