• #32236
    Forcetalks

    What are component Naming Rules in Salesforce Lightning?

    What are the component Naming Rules in Salesforce Lightning?

     

    #32273
     Prachi #9
    Forcetalks

    Hi Avnish,

    A These are Naming Rules in Salesforce Lightning
    • Must begin with a letter
    • Must contain only alphanumeric or underscore characters
    • Must be unique in the namespace
    • Can’t include whitespace
    • Can’t end with an underscore
    • Can’t contain two consecutive underscores

    thanks

    #34573
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    To add more –

    I prefer using a Application name as prefix and follow the component specification .Lets say my application name is “Chat” .Then i would name my components as below

    “chatcmp.cmp”

    “chatcontroller.js”

    “chatHelper.js”

    “chatevent.evt”

    “chatSVG.SVG”

    Naming convention should be based on component functionality to make it easier to locate the components .

    Hope this helps.

    #34591
    Salesforce | Parul Parul #2
    Forcetalks

    Hi

    A component name must follow the naming rules for Lightning components.
    A component name must follow these naming rules:

    Must begin with a letter
    Must contain only alphanumeric or underscore characters
    Can’t end with an underscore
    Can’t contain two consecutive underscores

    Thanks

    • This reply was modified 2 months ago by Salesforce | Parul Parul.
Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?