NullInjectorError: No provider for AngularFirestore

前端 未结 11 860
北恋
北恋 2020-12-02 10:34

I\'m learning Angular looking for help in fixing the error: I\'m following this link : https://github.com/angular/angularfire2/blob/master/docs/install-and-setup.md to creat

11条回答
  •  醉梦人生
    2020-12-02 11:15

    I take that to my app.module. After the imports it should be works

    providers: [
        { provide: LocationStrategy, useClass: HashLocationStrategy },
        { provide: FirestoreSettingsToken, useValue: {} }
      ],
    

    My Version:

    Angular CLI: 7.2.4
    Node: 10.15.0
    Angular: 7.2.5
    ... common, compiler, compiler-cli, core, forms
    ... language-service, platform-browser, platform-browser-dynamic
    ... router
    
    Package                           Version
    -----------------------------------------------------------
    @angular-devkit/architect         0.12.4
    @angular-devkit/build-angular     0.12.4
    @angular-devkit/build-optimizer   0.12.4
    @angular-devkit/build-webpack     0.12.4
    @angular-devkit/core              7.2.4
    @angular-devkit/schematics        7.2.4
    @angular/animations               8.0.0-beta.4+7.sha-3c7ce82
    @angular/cdk                      7.3.2-3ae6eb2
    @angular/cli                      7.2.4
    @angular/fire                     5.1.1
    @angular/flex-layout              7.0.0-beta.23
    @angular/material                 7.3.2-3ae6eb2
    @ngtools/webpack                  7.2.4
    @schematics/angular               7.2.4
    @schematics/update                0.12.4
    rxjs                              6.3.3
    typescript                        3.2.4
    webpack                           4.28.4
    
    

提交回复
热议问题