import { ThyPopoverConfig } from 'ngx-tethys/popover' ; import { Component , OnInit , TemplateRef } from '@angular/core' ; import { ThyPopover } from 'ngx-tethys/popover' ; import { ThyPopoverBasicContentComponent } from './popover-content.component' ; @ Component ( { selector : 'thy-popover-basic-example' , templateUrl : './basic.component.html' } ) export class ThyPopoverBasicExampleComponent implements OnInit { config : Partial < ThyPopoverConfig < unknown > > = { hasBackdrop : true , backdropClosable : true , placement : 'bottom' , originActiveClass : 'active' } ; constructor ( private thyPopover ) { } ngOnInit ( ) { } openPopover ( event ) { this . thyPopover . open ( ThyPopoverBasicContentComponent , { ... this . config , origin : event . currentTarget as HTMLElement , panelClass : 'demo-popover' } ) ; } openPopoverOutsideClosable ( event ) { this . thyPopover . open ( ThyPopoverBasicContentComponent , { ... this . config , origin : event . currentTarget as HTMLElement , panelClass : 'demo-popover' } ) ; } openTemplatePopover ( event , template ) { this . thyPopover . open ( template , { ... this . config , offset : 10 , origin : event . currentTarget as HTMLElement , panelClass : 'demo-popover' } ) ; } close ( ) { this . thyPopover . close ( ) ; } }