I'm using Angular 2 and ng-bootstrap. I've got an [ngSwitch]
with different tooltips defined in the content based on the case.
When the [ngSwitch]
variable changes, the tooltip throws an exception: this._unregisterListenersFn is not a function at NgbTooltip.ngOnDestroy.
I'm not sure if this could be a glitch with the ng-bootstrap library or if I'm doing something wrong.
Here is the offending code:
<div [ngSwitch]='jobStatusItem.type'>
<ul>
<li *ngFor='let item of filteredItems()'>
<span *ngSwitchCase='"job"'>
<template #tooltipContent>Details</template>
<span (click)='loadItem(item)' [ngbTooltip]='tooltipContent'>
<img src='...' />
</span>
</span>
</li>
</ul>
</div>
I'm able to change the jobStatusItem.type
once without problems, but the second time it throws the error.