javascript - UI Bootstrap modal in directive- multiple modals but only one opens -


as seen in this plunkr, have 2 modals, each in separate directive of modal-one , modal-two.

the problem is, modal 1 being opened, when clicking on modal 2 button.

i guess has .open method on $scope overwritten?

how prevent it? thank you!

basically behind scene sharing single scope amongest both directive, don't have scope property inside directive, sets false(it share scope). when first directive gets loaded registers $scope.open method popup code. , when other directive renders takes same scope , override $scope.open method.

you fix issue making directive scope use scope: true / scope: {}

working demo

else share same scope, need change method name in 1 of 2 directive.

other demo


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -