Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

252
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda