javascript - Why is the dismissible alert not being dismissed? -
note: let me start saying i'm aware of question solution incomplete , don't yet have not enough reputation on stackoverflow comment on it. so, left option of creating duplicate question.
i'm trying use angularjs , bootstrap (ui-bootstrap) show dismissible alert. however, after including ui-bootstrap-tpls-*.js file (solution suggested on original question) doesn't seem work. although work jquery.
please check plunker
i found way have dismissible alert without adding logic controller. don't need bootstrap-*-js. have alert close button uses ng-click on $scope variable hide parent div on ng-show. (the controller sets variable whether alert should shown or not.)
<div class="alert alert-warning" ng-show="show_alert"> <button type="button" class="close" ng-click="show_alert=false">×</button> <strong>warning!</strong> best check yo self, you're not looking good. </div> the css classes alert alert-warning , close styled bootstrap.
check out plunker above solution.
Comments
Post a Comment