Angular:
i麓m using angular 6
Firebase:
"firebase": "^5.5.8"
AngularFire:
"@angular/fire": "^5.1.0"
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Failing test unit, Plunkr, or JSFiddle demonstrating the problem
Steps to set up and reproduce
Sample data and security rules
<-- include/attach/link to some json sample data (or provide credentials to a sanitized, test Firebase project) -->
* Errors in the JavaScript console *
Uncaught Error: Unexpected value 'AngularFireDatabase' imported by the module 'AppModule'. Please add a @NgModule annotation.
* Output from firebase.database().enableLogging(true); *
* Screenshots *
i want to fetch list of my data
In your app.module.ts, import AngularFireDatabaseModule instead of AngularFireDatabase.
And then you can use AngularFireDatabase in your service/component
import { AngularFireDatabaseModule } from 'angularfire2/database';
......
imports: [
....
AngularFireDatabaseModule,
.....
]
Most helpful comment
In your app.module.ts, import AngularFireDatabaseModule instead of AngularFireDatabase.
And then you can use AngularFireDatabase in your service/component