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

153
Views
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 answers
Answer question

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 Report
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!