Open: ./src/app/app.module.ts
And import Firebase Modules at the top:
import { environment } from '../environments/environment';
import { AngularFireModule } from 'angularfire2';
import { AngularFirestoreModule } from 'angularfire2/firestore';
And VERY IMPORTANT:
Remember to update 'imports' in NgModule:
@NgModule({
declarations: [
AppComponent,
OtherComponent // Add other components here
...
],
imports: [
BrowserModule,
AngularFireModule.initializeApp(environment.firebase, 'your-APP-name-here'),
AngularFirestoreModule
],
...
})
Give it a try, it shall now work.
For detailed information follow the angularfire2 documentation:
https://github.com/angular/angularfire2/blob/master/docs/install-and-setup.md
Good luck!