Angularfire: AngularFireMessaging

Created on 3 Oct 2018  路  4Comments  路  Source: angular/angularfire

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!

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, 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.

All 4 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sharomet picture sharomet  路  3Comments

jnupeter picture jnupeter  路  3Comments

mypark picture mypark  路  3Comments

itisparas picture itisparas  路  3Comments

martinyoussef picture martinyoussef  路  3Comments