angularjs - Detect closing $modal by backdrop -
i'm using angularjs angularui-bootstrap. there way detect when modal being closed clicking on backdrop? trying change boolean based on closing of modal.
sure, easy detect closing esc / clicking on backdrop. if such event takes place result
promise rejected. so, can run whatever logic want adding error handler result
promise returned $modal.open({...})
method.
you can see in action in plunker forked demo page (http://angular-ui.github.io/bootstrap/): http://plnkr.co/edit/qjbjkb7but5vfinvpyrf?p=preview $log.info('modal dismissed at: ' + new date());
code executed on modal's dismiss.
Comments
Post a Comment