SHARE
TWEET

Untitled

a guest Apr 9th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private loadDetailComponent() {
  2.         this.sidenavService.ideaSelected
  3.             .subscribe((selectedIdea: IIdea) => {
  4.                 // load idea-detail-overlay
  5.                 const componentFactory = this.componentFactoryResolver.resolveComponentFactory(IdeaDetailOverlayComponent);
  6.                 const viewContainerRef = this.detailsHost.viewContainerRef;
  7.                 viewContainerRef.clear();
  8.  
  9.                 const componentRef = viewContainerRef.createComponent(componentFactory);
  10.                 const ideaOverLayComponent = componentRef.instance as IdeaDetailOverlayComponent;
  11.  
  12.                 ideaOverLayComponent.idea = selectedIdea;
  13.             });
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top