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

155
Visualizações
Angular dialog close button only works in debug

I have a dialog that I open with:

(<any>$(this.showAnswersModal.nativeElement)).foundation('open');

I have a close button in the dialog that works (closes the dialog) if I am running debug through IntelliJ, but it will not close the dialog if I am not running debug with IntelliJ. Pressing and/or clicking outside of the dialog closes it whether in debug or not.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Turns out that I had the event code in the HTML (template) file wrong. I had missed the parenthesis.

I had:

(onCloseButtonClicked)="onClose" 

I should have had:

(onCloseButtonClicked)="onClose()"

So initially, the event handler never got called, which contained the code to close the dialog, but the dialog still got closed in debug somehow. The code that wasn't getting called in the component initially was:

  private onClose() {
    (<any>$(this.showModal.nativeElement)).foundation('close');
  }

Somehow running it in IntelliJ debug still closed the dialog when I clicked the close button.

about 4 years ago · Juan Pablo Isaza Relatório
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