Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

258
Views
Using ngbTooltip Inside ngSwitch Throws Error When Destroyed

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>

Here is the error message: enter image description here

I'm able to change the jobStatusItem.type once without problems, but the second time it throws the error.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!