Last active
August 29, 2015 14:07
-
-
Save surendrans/c95d69df8538fe4f6d9f to your computer and use it in GitHub Desktop.
$ionicPopup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .factory('pushNotificationHandler', function($ionicPopup, $state) { | |
| return { | |
| action: function() { | |
| if($state.current.name != "login") { | |
| popupParams = { | |
| template: '<p class="center-algin">There are some New requests.<br>Do you like to update?</p>', | |
| title: 'Notification', | |
| buttons: [{ | |
| text: 'Cancel' | |
| }, { | |
| text: '<b>Update</b>', | |
| type: 'button-positive', | |
| onTap: function(e) { | |
| $state.go($state.current.name, {},{reload: true}) | |
| } | |
| }] | |
| } | |
| var popup = $ionicPopup.show(popupParams); | |
| popup.then(function(res) { | |
| }); | |
| } | |
| } | |
| } | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment