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

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -