Hi there
I upgraded to the Ionic Native 3 stuff according to the blog-entry.
Now I'm constantly getting the error "No provider for push!" When running the app.
The relevant code is:
import {Push, PushObject, PushOptions, NotificationEventResponse, RegistrationEventResponse} from '@ionic-native/push';
// ... some boilerplate stuff here ...
export class NotificationService {
// ... some boilerplate stuff here ...
constructor(private platform: Platform,
private push: Push) { // <------
console.log('Hello NotificationService Provider');
}
// ... some boilerplate stuff here ...
}
The data from the ionic error window:
I'm using the WKWebView. But I don't think that's relevant, because if i'm switching it off it still doesn't work.
I don't use the ionic cloud services.
Keep up the good work! Really appreciate it
Make sure to add Push to your providers in app.module.ts:
import { Push } from '@ionic-native/push';
// ...
providers: [ Push ]
See example at the bottom here: http://ionicframework.com/docs/v2/native/
Maybe worth mentioning that this should be done for all plugin providers. I didn't find it mentioned in the native doc pages.
@jadsalhani it's mentioned here: http://ionicframework.com/docs/v2/native/#Add_Plugins_to_Your_App_Module
Heh, Chrome was displaying the old cached version of the page...A hard reload did the trick. Talk about trusting your browser these days
Thanks!
@jadsalhani See https://github.com/driftyco/ionic-app-scripts/issues/825
Most helpful comment
Make sure to add
Pushto your providers inapp.module.ts:See example at the bottom here: http://ionicframework.com/docs/v2/native/