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

154
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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