Advertisement
Guest User

Untitled

a guest
Oct 21st, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. .run(function($ionicPlatform) {
  2. $ionicPlatform.ready(function($rootScope, $ionicPopup, $timeout) {
  3.  
  4. // Code here
  5. ....
  6.  
  7. $rootScope.showAlert = function() {
  8. var alertPopup = $ionicPopup.alert({
  9. title: 'Don't eat that!',
  10. template: 'It might taste good'
  11. });
  12.  
  13. alertPopup.then(function(res) {
  14. console.log('Thank you for not eating my delicious ice cream cone');
  15. });
  16. };
  17.  
  18. // Code here
  19. ....
  20. });
  21.  
  22. <button ng-click="$root.showAlert()">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement