First, be sure to configure $ionicAppProvider (do so right after declaring the app module), like so:
app.config(['$ionicAppProvider', function($ionicAppProvider) {
// Identify app
$ionicAppProvider.identify({
// Your App ID
app_id: 'xxx',
// The public API key services will use for this app
api_key: '80xxxxxx',
// Your GCM sender ID/project number (Uncomment if supporting Android)