Guest User

Untitled

a guest
Jan 12th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. export class OverlayComponent {
  2. embeddedViewRef: EmbeddedViewRef<any>;
  3. @ViewChild('mntPageOverlayContainer', {read: ViewContainerRef}) container: ViewContainerRef;
  4.  
  5. showTemplate(value: TemplateRef<any>, props?: OverlayProps) {
  6. this.embeddedViewRef = this.container.createEmbeddedView(value);
  7.  
  8. if (props && props.onShow) {
  9. this.embeddedViewRef.rootNodes.forEach(element => [make modifications to it]);
  10. }
  11. }
  12.  
  13. <ng-container #mntPageOverlayContainer>
  14. </ng-container>
Add Comment
Please, Sign In to add comment