I have a child component folder "bCPContractTOP" which has
- bCPContractTOP.HTML
- bCPContractTOP.js
- bCPContractTOP.js-meta.xml
How to call this from parent component. I am getting one error
LWC1010: Failed to resolve entry for module "bCPContractTOP".
<template>
<div>
<lightning-input type="text" value={checknameinputvalue} name="CheckName" label="Check Name" required onchange={handleInputChange}></lightning-input>
<lightning-button label="Generate" title="Generate" class="slds-m-left_x-small" onclick={handleClick} ></lightning-button>
<c-bCPContractTOP check-name={checkNameValue}></c-bCPContractTOP>
</div>
</template>
Best Answer
Capital letters become lowercased and prefixed with a hyphen (
-
), so the name would become:Your code would look like this:
This is called "kebab case" in the documentation.
For this reason, it's probably more beneficial to not use so many capital letters in your component name.
Also, the file names are case sensitive--make sure your template is
bCPContractTOP.html
(lowercasehtml
).