Skip to content

Instantly share code, notes, and snippets.

@surendrans
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save surendrans/c95d69df8538fe4f6d9f to your computer and use it in GitHub Desktop.

Select an option

Save surendrans/c95d69df8538fe4f6d9f to your computer and use it in GitHub Desktop.
$ionicPopup
.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