function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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)
Chuan SunChuan Sun
@Venu9999, Thanks so much. I was dying to make my component deployed. 
my file name is 
com_Example

the corresponding component reference should be
<c-com_-example/>

😂note the underscroll and the dash.