首页 > 解决方案 > angularfire2 找不到模块'@angular/fire'

问题描述

  1. app.components.ts:

从“@angular/fire”导入 { AngularFireModule };从 'angularire2/firestore' 导入 { AngularFirestore };

@NgModule
({ 声明:[
AppComponent,
SignupComponent,
LandingComponent, ProfileComponent
, NavbarComponent
, FooterComponent
,
LoginComponent,
BlogComponent,
ForgetpwdComponent,
BlogDashboartComponent,
BlogDetailsComponent,
BlogListComponent ],
进口: [ BrowserModule, NgbModule.forRoot(), FormsModule, RouterModule, AppRoutingModule, HomeModule , ReactiveFormsModule, HttpModule],
提供者: [AngularFirestore],
引导程序: [AppComponent] })

不起作用的导入位于服务中:

从'./posts'导入{帖子};
从'@angular/core'导入{可注射};
从 'angularfire2/firestore' 导入 { AngularFirestore, AngularFirestoreCollection };
导入'rxjs/add/operator/map';

我只包括了可能与错误有关的依赖项,但如果我遗漏了什么,请告诉我。

标签: firebaseangularfire2

解决方案


推荐阅读