Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

253
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda