77  OnDestroy , 
88  OnInit , 
99  Output , 
10+   TemplateRef , 
11+   ViewContainerRef , 
1012}  from  '@angular/core' ; 
1113import  { 
1214  ConnectedPosition , 
@@ -15,7 +17,7 @@ import {
1517  OverlayPositionBuilder , 
1618  OverlayRef , 
1719}  from  '@angular/cdk/overlay' ; 
18- import  {  ComponentPortal  }  from  '@angular/cdk/portal' ; 
20+ import  {  ComponentPortal ,   TemplatePortal  }  from  '@angular/cdk/portal' ; 
1921import  {  MdbPopoverComponent  }  from  './popover.component' ; 
2022import  {  fromEvent ,  Subject  }  from  'rxjs' ; 
2123import  {  first ,  takeUntil  }  from  'rxjs/operators' ; 
@@ -31,7 +33,7 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
3133  @Input ( )  mdbPopoverTitle  =  '' ; 
3234  @Input ( )  popoverDisabled  =  false ; 
3335  @Input ( )  placement  =  'top' ; 
34-   @Input ( )  template   =   false ; 
36+   @Input ( )  template :  TemplateRef < any > ; 
3537  @Input ( )  animation  =  true ; 
3638  @Input ( )  trigger  =  'click' ; 
3739  @Input ( )  delayShow  =  0 ; 
@@ -186,12 +188,11 @@ export class MdbPopoverDirective implements OnInit, OnDestroy {
186188      this . _open  =  true ; 
187189
188190      this . _tooltipRef  =  this . _overlayRef . attach ( tooltipPortal ) ; 
189-       this . _tooltipRef . instance . content  =  this . mdbPopover ; 
191+ 
192+       this . _tooltipRef . instance . content  =  this . template  ||  this . mdbPopover ; 
190193      this . _tooltipRef . instance . title  =  this . mdbPopoverTitle ; 
191-       this . _tooltipRef . instance . template  =  this . template ; 
192194      this . _tooltipRef . instance . animation  =  this . animation ; 
193195      this . _tooltipRef . instance . animationState  =  'visible' ; 
194- 
195196      this . _tooltipRef . instance . markForCheck ( ) ; 
196197
197198      this . popoverShown . emit ( this ) ; 
0 commit comments