Parent to Child Communication on action ParenttoChildCommunicationonaction Html <div class="slds-var-m-bottom_medium"></div> <lightning-card title="Parent to Child Communication on action" > <div class="slds-var-m-bottom_medium"> <lightning-input type="number" label="Enter Percentage"
onkeyup={handlerinputvalue}></lightning-input>
<c-parenttochild-progress-component progressvalue = {percentage} ></c-parenttochild-progress-component> </div> --------------------------------------------------- ParenttoChildCommunicationonaction JS import { LightningElement,api } from 'lwc'; export default class Parenttochild extends LightningElement { percentage = 10; handlerinputvalue(event){ this.percentage = event.target.value; } } --------------------------------------------------------------- ParenttoChildProgressComponent Html <template>
<lightning-progress-bar value={progressvalue} size="large">
</lightning-progress-bar> </template> ------------------------------------------------------------------- ParenttoChildProgressComponent JS import { LightningElement,api } from 'lwc'; export default class ParenttochildProgressComponent extends
LightningElement { @api progressvalue }
No comments:
Post a Comment