0

I am using Angular bootstrap, while routing one page to another page (particularly when clicking browser back button), modal backdrop is appearing in new page also, it is not getting hidden.Below is the modal html code.

HTML

<div id="createFolder" class="modal" role="dialog" data-backdrop="static" data-keyboard="true">
 <!-- Modal data -->
</div>

Javascript

 angular.element("#createFolder").modal('show');

Below is the link I've seen, but it is jQuery, I am using angularjs and issue

Backdrop not getting hidden

  • 3
    This snippet is not at all useful to resolve the problem.Share more code – brk Jul 19 '18 at 06:20
  • Which version of UI router are you using? – 31piy Jul 19 '18 at 06:21
  • @brk when I click on browser back button, modal is getting closed but backdrop is still there. Just I am opening the modal using modal id. I will update my code, please check once. – Mounika Neela Jul 19 '18 at 06:24
  • @31piy in my package.json it is `angular-ui-router: ^0.3.1` – Mounika Neela Jul 19 '18 at 06:26
  • @31piy So from the above link what I observed is, I should update my angular router version... is that correct? – Mounika Neela Jul 19 '18 at 06:32
  • @MounikaNeela -- No, it means that there is a bug in Angular Bootstrap library. See the question which I have in my previous comment, and look for the workaround. – 31piy Jul 19 '18 at 06:48
  • @31piy I wrote the common route which will be fired on every routing. In that common route I wrote `$(".modal-backdrop.in").hide();` – Mounika Neela Jul 23 '18 at 05:22

0 Answers0