in HTM:
<span #popover="ngbPopover" id="downloadButton" placement="bottom" [ngbPopover]="popContent"
triggers="manual" (click)="openPop();"
[ngClass]="{'active-icon' : iconCanbeActive, 'default-icon': !iconCanbeActive }"></span>
in component:
@ViewChild('popover') public popover: NgbPopover;
then method in the api can be used in component