【发布时间】:2016-04-21 12:22:13
【问题描述】:
我从 app exchange 安装了一个闪电组件,现在我想在我的自定义闪电应用中使用该组件
有可能吗?
<aura:app>
//code for adding components
</aura:app>
【问题讨论】:
标签: salesforce components lightning
我从 app exchange 安装了一个闪电组件,现在我想在我的自定义闪电应用中使用该组件
有可能吗?
<aura:app>
//code for adding components
</aura:app>
【问题讨论】:
标签: salesforce components lightning
如果您正在使用组件:
<aura:component >
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
{!v.body}
</aura:component>
在控制器中(例如“mvc:CalendarComponent”,把你的组件放在这里):
doInit : function(component, event, helper) {
$A.createComponent(
"mvc:CalendarComponent",
{
},
function(newCmp){
if (component.isValid()) {
component.set("v.body", newCmp);
}
}
);
}
【讨论】: