Created
April 4, 2016 20:19
-
-
Save bandicoot86/491a983974fb45faa4cdacafff8bb1ad to your computer and use it in GitHub Desktop.
Example.js
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
// Ionic Starter App | |
// angular.module is a global place for creating, registering and retrieving Angular modules | |
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html) | |
// the 2nd parameter is an array of 'requires' | |
angular.module('starter', ['ionic']) | |
.run(function($ionicPlatform) { | |
$ionicPlatform.ready(function() { | |
if (window.cordova && window.cordova.plugins.Keyboard) { | |
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard | |
// for form inputs) | |
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); | |
// Don't remove this line unless you know what you are doing. It stops the viewport | |
// from snapping when text inputs are focused. Ionic handles this internally for | |
// a much nicer keyboard experience. | |
cordova.plugins.Keyboard.disableScroll(true); | |
console.log('My app test'); | |
var push = PushNotification.init({ | |
android: { | |
senderID: "33658396394" | |
}, | |
ios: { | |
alert: "true", | |
badge: "true", | |
sound: "true" | |
}, | |
windows: {} | |
}); | |
push.on('registration', function(data) { | |
// data.registrationId | |
console.log('Data registration ' + data.registrationId); | |
}); | |
} | |
if (window.StatusBar) { | |
StatusBar.styleDefault(); | |
} | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment