+ Start a Discussion
sevindusevindu 

Add another LWC component to a LWC component

User-added image

I have created two LWC component and in my prop.html I want to add lWC component.

<template>
    <ligthning-input label="percentage" type="number" min="0"
    max="100" value={percentage} onchange={changepercent}></ligthning-input>   
    <c-lwc percentage={percentage}></c-lwc>
</template>

When I try to push this to my scratch org I am getting the following error

User-added image

I am new to LWC
Best Answer chosen by sevindu
sfdcDeveloper 12sfdcDeveloper 12
Can you rename your lwc component to some other name

All Answers

sfdcDeveloper 12sfdcDeveloper 12
Can you rename your lwc component to some other name
This was selected as the best answer
Venu9999Venu9999
In lwc before every capital letter "-" Sign will be added automatically. So we have to make sure that other component name when referencing in lwc component. Check example Code (https://www.salesforcepoint.com/2020/06/how-to-invoke-call-child-lightning-web.html)