AngularJs-ui modal 封装 dialog

经常在操做中和用户进行交互,及时反馈操做结果;用到alert 和confrim 功能 找到一个基于anguarjs-ui的modal,方便咱们使用html

angular-dialog-service

 

注意要引入git

Angular JS ngSanitize - http://code.angularjs.org/1.2.1/angular-sanitize.min.jsangularjs

ngSanitize: http://docs.angularjs.org/api/ngSanitize (needed for ng-bind-html)github

参见官方实例api

使用 confirm , 针对选择 yes 和选择no 的方法ui

 var dlg = $dialogs.confirm('Please Confirm','Is this awesome or what?');
         dlg.result.then(function(btn){
          //yes callback
           $scope.confirmed = 'You thought this quite awesome!';
         },function(btn){
          //no callback
           $scope.confirmed = 'Shame on you for not thinking this is awesome!';
         });    
相关文章
相关标签/搜索