4

For a project I'm working on, I need 3 things...

  1. A list of all possible namespaces that define Lightning Components. This would look something like ['ui','force','c','managednamespace'].

  2. Given a particular namespace, return a list of available component descriptors for that namespace like ['ui:button','ui:inputText','ui:inputDate'].

  3. Given a particular component descriptor, be able to get the full component definition for that Component. Such that if I called $A.componentService.getDef('namespace:mycomponent'), it would be available.

Are there currently methods for getting this info from Javascript or Apex?

1

Unless there's something I'm not aware of...

  1. Can't do

  2. Sorry another can't do.

  3. Coming in the next release. Still subject to access, if it's not marked global you wouldn't get the definition back.

| improve this answer | |
  • 1
    Following up on this, it should soon be possible to do everything you ask. – Kris Gray Jul 27 '16 at 21:04
  • FYI, We're trying to change the way we do definitions, so we'll be reworking that into a better service and exposing that. Eventually 3 will be possible. 1 and 2 should be via the Tooling API that we'll need to expose soon. – Kris Gray Oct 12 '16 at 20:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.