ALTHOUGHT , in my app.module
import { AngularFireMessagingModule , AngularFireMessaging} from '@angular/fire/messaging';
and in my imports array
AngularFireMessagingModule
and in providers array
AngularFireMessaging
RROR Error: StaticInjectorError(AppModule)[AngularFireMessaging -> InjectionToken angularfire2.app.options]:
StaticInjectorError(Platform: core)[AngularFireMessaging -> InjectionToken angularfire2.app.options]:
NullInjectorError: No provider for InjectionToken angularfire2.app.options!
Have you checked out the docs?
I just followed the same doc. same error. any luck on this? @ananbetak
i fixed all the errors i had already , but i forgot where this problem came from honestly...
I fixed it by fixing import of AngularFireModule. I was previously using the RC version and upgraded to the latest version for messaging module, so AngularFireModule was imported from angularfire2.
But then I see the release notes and found that this module is deprecated and it should be imported from @angular/fire which fixed the problem.
Maybe this can be useful to someone.
Most helpful comment
I fixed it by fixing import of
AngularFireModule. I was previously using the RC version and upgraded to the latest version for messaging module, soAngularFireModulewas imported fromangularfire2.But then I see the release notes and found that this module is deprecated and it should be imported from
@angular/firewhich fixed the problem.Maybe this can be useful to someone.