Ngx-bootstrap: Modal Backdrop Not Removed

Created on 19 Oct 2016  路  25Comments  路  Source: valor-software/ngx-bootstrap

I think the issue I am seeing is similar to #853. When in a modal (which has a routerLink), the backdrop is correctly removed when navigating away. When I navigate back to my page and open the modal, I get 2 backdrop elements. Rinse and repeat, I get 3, and so on and so forth.

I am hiding the modal when routing which may be the issue, but I am not sure:

this.router.events.subscribe(e => {
  this.modal.hide();
});

The multiple backdrops are also staying when I close the modal normally and navigate away and back in.

comp(modal) reproduce

Most helpful comment

+1, same issue. Looking for a fix.

All 25 comments

Please check, should be fine now

I'm having the same issue, the backdrop is not being removed.
This is what is left after calling modal.hide()

<bs-modal-backdrop class="modal-backdrop fade in"></bs-modal-backdrop>

`

Was this page helpful?
0 / 5 - 0 ratings