node.jsangularauthenticationionic-frameworkinject

NullInjectorError: No provider for Auth


I have a problema with this service. enter image description here

This is my app.module. enter image description here

The injection in InicioPage: enter image description here

I tried , add in providers in iniciopage.module, but not work


Solution

  • I had a similar problem and solved it by adding these two lines in app.module.ts

    import { FIREBASE_OPTIONS } from "@angular/fire/compat";
    @NgModule({
      ...
      providers: [
        { provide: FIREBASE_OPTIONS, useValue: environment.firebase}
      ]
    })