Guest User

Untitled

a guest
Jul 15th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. ({
  2. init : function init(component, event, helper) {
  3. var injectionService = component.find('injectionService');
  4. injectionService.getComponentName()
  5. .then($A.getCallback(function(componentName){
  6. $A.createComponent(componentName,{
  7. accountId : component.get('v.recordId'),
  8. contact: component.get('v.cont'),
  9. "aura:id" : "injectedComponent"
  10. }
  11. , function (contentComponent, status, error) {
  12. if (status === 'SUCCESS') {
  13. component.set('v.injectedComponent', contentComponent);
  14. } else {
  15. $A.log(error);
  16. }
  17. });
  18. }))
  19. }
  20. })
Add Comment
Please, Sign In to add comment