2

I am looking for a way to get one of the standard lightning components into my own component.

I want to do the same thing as I do with custom components like: <c:myComponent />

To be specific I want the activity standard component so it would be something like:

<SFNamespace:Activity />

2 Answers 2

1

You can only do that if the component is actually exposed to the public. On your org go to .lightning.force.com/auradocs/reference.app

and you will see a list of components that you can use (including the one made available by SF).

Specifically there should be: force/forceChatter/forceCommunity/lightning/ui - those are SF components

0

Yes, you can actually do this but not via markup though (tested in Summer 17). In your component's markup, define a container component, e.g.

<div aura:id="componentContainer"></div>

Then in you controller or helper you can load the activity timeline component like this:

createActivityTimeline: function (component, event, helper) { var container = component.find("containerTest"); $A.createComponent("runtime_sales_activities:activityPanel", { recordId: component.get('v.recordId') }, function(cmp) { container.set("v.body", [cmp]); }); }

Notice the name of the component runtime_sales_activities:activityPanel. As said at the beginning, it won't work through markup though.

1
  • Hi Christoph. Where did you get the component name from? Can this be found somewhere in documentation? May 4, 2018 at 9:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .