I get this error when I try to set GCM push's api key in app.js
Here is the code I use:
.config(['$ionicAppProvider', function($ionicAppProvider) {
// Identify app
$ionicAppProvider.identify({
// The App ID for the server
app_id: 'MY_APP_ID',
// The API key all services will use for this app
api_key: 'MY_API_KEY',
//The GCM project number
gcm_id: 'MY_GCM_PROJECT_NUMBER'
});
}])
It looks like you haven't installed the ionic-service-core module and setup your app with it. You'll need to do the following:
1) Install Ionic Service Core.
Run ionic add ionic-service-core
on the command line for your project
2) Add this script tag to index.html
<script src="lib/ionic-service-core/ionic-core.js"></script>
3) Add the ionic.service.core
module to your app.js like so:
angular.module('starter', ['ionic',
'ionic.service.core',
'starter.controllers'])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With