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!';
         });    
相關文章
相關標籤/搜索