Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. angular.module('starter', ['ionic','snackbar'])
  2.  
  3. .run(function($ionicPlatform) {
  4. $ionicPlatform.ready(function() {
  5. if(window.cordova && window.cordova.plugins.Keyboard) {
  6. cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  7. cordova.plugins.Keyboard.disableScroll(true);
  8. }
  9. if(window.StatusBar) {
  10. StatusBar.styleDefault();
  11. }
  12. });
  13. })
  14.  
  15. .controller('AppCtrl', function ($scope, $snackbar) {
  16.  
  17. $scope.onClick = function () {
  18. var options = {
  19. message: "This is a Snackbar",
  20. messageColor: "white",
  21. buttonName: "Undo",
  22. buttonFunction: $snackbar.hide(),
  23. buttonColor: "red",
  24. time: 2000
  25. }
  26. $snackbar.show(options);
  27. }
  28. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement