Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No provider for AngularFireAuth

I am using Ionic4 and @angular/fire to code an chat application, but I'm getting a white page and error message(F12) when I run my application. Can someone help me ?

thank you.

app.module.ts

import { firebaseConfig } from '../environments/environment';

import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule, AngularFireAuth } from '@Angular/fire/auth';
import { AngularFireDatabaseModule } from '@angular/fire/database';
// import { AngularFirestore } from '@angular/fire/firestore';
import { HttpClient } from '@angular/common/http';

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
    AngularFireModule.initializeApp(firebaseConfig),
    AngularFireAuthModule,
    AngularFireDatabaseModule, ],
  providers: [
    StatusBar,
    AngularFireModule,
    AngularFireAuthModule,
    AngularFireAuth

ERROR (F12) with Chrome

<!-- begin snippet: js hide: false console: true babel: false -->

When I go to the home page it works, it is only when i go to my login page

thanks alot to those who will help me

like image 862
Diogène Avatar asked Dec 08 '25 09:12

Diogène


1 Answers

The error I made was in the thrid line, it is not @Angular but @angular. after changing that, everything work fine

like image 159
Diogène Avatar answered Dec 11 '25 07:12

Diogène



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!