I created a plunker to recreate the problem:
http://plnkr.co/edit/sPPB0Cq0PUg1jmzzZtXh
It contains an angular js gadget with angular -ui-bootsrap.
- index.html is the main html file with js includes and div ng-view.
- other.html, main.html - views
- app.js - main angular js file with application declaration.
- modal.js - some js things related to modal. I wrapped $ modal with my own service, which responds to a broadcast "show modal" event, showing modality and creating a directive that binds the elements as an attribute and emits / passes this event.
Problem:
I am trying to use a modal service to open a modal window.
It opens, after I close it, I can not open it again.
In fact, when you try to open again, it does not seem to open. but when you move to another place in the angular application, the modals suddenly appear (or modals if you clicked many times).
I got a little lost, and the documentation really didn't help me.
Can someone check this out and tell me what I'm doing wrong?
source
share