sajTempler / IonicFirebasePhoneAuth

13 stars 8 forks source link

no provider found for firebase! #4

Closed XXX-21 closed 5 years ago

XXX-21 commented 5 years ago

Uncaught (in promise): Error: StaticInjectorError(AppModule)[LoginPage -> Firebase]: StaticInjectorError(Platform: core)[LoginPage -> Firebase]: NullInjectorError: No provider for Firebase! Error: StaticInjectorError(AppModule)[LoginPage -> Firebase]: StaticInjectorError(Platform: core)[LoginPage -> Firebase]: NullInjectorError: No provider for Firebase! at _NullInjector.get

I already create a provider for firebase but it did not work it.

itscodezero commented 5 years ago

You can use the mock.provider that is there in the repository already. If you are not using it then you will need to add Firebase as provider in your app.module.ts file

in app.module.ts: import {Firebase} from '@ionic-native/firebase/ngx'

and then in providers array add providers: [ yourOtherProviders, Firebase ]