Search code examples
angulartypescriptangular-materialfuse

Angular Material Dialog box showing up only half the time


I tried searching and thought that #2351 may of be help but trying all the workarounds there also gave no help.

I'm using Fuse templating and working with a programs list and program detail page. I've provided a delete function for both the individual page and for the listed page.

I'm using Angular Material's Dialog component to make sure that the user would like to delete the selected program. When I click the Delete button on the List page, it opens a small white square with no contents.

When I go into the detailed program and click the delete box, I get what should happen. Asking me if I want to delete the program.

Also, when I then return to the list of programs from the program detail and click the delete button, it works. It only will work after I visit the program detail page.

I have a lot of code so not sure how much to paste but happy to post some but thought I'd see if there was any direction first off with what provided. Thank you.

What I get without first navigating to the detailed component:

What I get without first navigating to detailed component

The behaviour I expect but only get after FIRST going to detailed component and then back to the list component:

Behaviour I expect but only get after FIRST going to detailed component and then back to the list component


Solution

  • It turns out I wasn't passing data properly with my app. I had some work around functioning that wouldn't fire unless I went through navigating to the detail program and back.

    Unfortunately I'm not sure when I fixed it exactly. I was checking through things and I only realised it whilst working on another problem.