2016-05-16 8 views
0

機能がこのケース(smsAll)で実行を終了すると、どのように 'メッセージが正常に送信されました'のようなポップアウトメッセージを配置できますか?機能が終了した後にポップアウトメッセージを挿入する

コントローラ

$scope.smsAll = function() { 

     $scope.smsStatusZeroF2F = ""; 
     $scope.smsStatusMoreThanTenF2F = ""; 
     $scope.smsStatusBetween14F2F = ""; 

     if ($scope.isSMSzeroF2F) { 
      $scope.smsZeroF2F(); 
     } 

     if ($scope.isSMSmoreThanTenF2F) { 
      $scope.smsMoreThanTenF2F(); 
     } 

     if ($scope.isSMSBet14F2F) { 
      $scope.smsBetween14F2F(); 
     } 

     if ($scope.isSMSZeroPSL) { 
      $scope.smsZeroPSL(); 
     } 

     if ($scope.isSMStransAndsaas) { 
      $scope.smsZeroTransOrSaasReport(); 
     } 

    }; 

report.htmlを

<button type="button" class="btn btn-primary" ng-click="smsAll()">Send SMS for selected</button> 
+0

は、通知ライブラリ、元のいずれかを使用します。 https://notifyjs.com/ – Bettimms

答えて

0

一部角度通知後ろのモジュールを使用しないのはなぜ?ただ、this ソースコードのような はhere

それともバウアー

bower install angular-notify --save 

をインストールし、あなたのindex.htmlにDIST /アンギュラnotify.jsとDIST /アンギュラnotify.cssを追加しています。

cgNotifyをモジュールのモジュール依存として追加します。

angular.module('your_app', ['cgNotify']); 

用法:

function myController($scope,notify){ // <-- Inject notify 

    notify('Your notification message'); // <-- Call notify with your message 

    notify({ message:'My message', templateUrl:'my_template.html'}); 

} 
関連する問題