• #30385
    Forcetalks

    Is it a mandatory requirement to have a namespace to create Lightning components?

    Is it a mandatory requirement to have a namespace to create Lightning components?

    Tagged: , ,

    #30467
    Forcetalks

    hello Avnish,

    It is not mendetory to have namespace to create Lightning components, because

    when org has no namespace, then we write code as:

    <aura:component extends=”c:myComponent”>

    while when we have namespace then we write code as:

    <aura:component extends=”yournamespace:myComponent”>

    #34568
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    Every component is part of a namespace, which is used to group related components together. If your organization has a namespace prefix set, use that namespace to access your components. Otherwise, use the default namespace to access your components.
    Another component or application can reference a component by adding <myNamespace:myComponent> in its markup. For example, the helloWorld component is in the docsample namespace. Another component can reference it by adding <docsample:helloWorld /> in its markup.

    Lightning components that Salesforce provides are grouped into several namespaces, such as aura, ui, and force. Components from third-party managed packages have namespaces from the providing organizations.

    In your organization, you can choose to set a namespace prefix. If you do, that namespace is used for all of your Lightning components. A namespace prefix is required if you plan to offer managed packages on the AppExchange.

    If you haven’t set a namespace prefix for your organization, use the default namespace c when referencing components that you’ve created.

    Hope it helps.

Viewing 3 posts - 1 through 3 (of 3 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?