Recently, I made some updates to my project where I am utilizing ionic 3
, upgrading angular
to version 5.0
, and also updating angularfire2
to version 5.0
. Despite resolving various errors along the way, I have encountered a new issue that has left me confused. The error message reads:
Uncaught (in promise: Error: StaticInjectorError[AngularFireDatabaseModule]: StaticInjectorError[AngularFireDatabaseModule]: NullinjectorError: No provider for AngularFireDatabaseModule!
In my app.module.ts file, I have the following setup:
...
import { AngularFireDatabaseModule } from 'angularfire2/database'
...
imports: [
BrowserModule,
BrowserAnimationsModule,
IonicModule.forRoot(MyApp),
HttpModule,
NgCalendarModule,
AngularFireModule.initializeApp(firebaseConfig),
AngularFireDatabaseModule, //This is included in imports
...
The error occurs when attempting to navigate to a specific page within my application, particularly one that involves angularfire2 requests. It is worth mentioning that I upgraded these requests to adhere to the new angularfire2 5.0
code standards, hence the confusion surrounding this error. To keep things running smoothly, I opted to use angularfire2/database-deprecated
temporarily so that all requests can function without any prior adjustments. Any assistance or insights on this matter would be greatly appreciated. Thank you.