Apologies as I can't think of a better way of including all the information... When I run this, I get an error saying the following. I've followed the Ionic Docs to the T, I can't figure out what could possibly be wrong.
Error:
No provider for AngularFireDatabase!
Package.json
App.module.ts
Home.html
Home.ts
AngularDatabase
(same for AngularAuth) is separated to its own module AngularFireDatabaseModule
(AngularFireAuthModule for AngularAuth) from version [email protected], see documentation here.
you should import AngularFireDatabaseModule
(AngularFireAuthModule for Authentication) in your RootModule
.
import { AngularFireModule } from 'angularfire2'; // for AngularFireDatabase import { AngularFireDatabaseModule } from 'angularfire2/database'; import { AngularFireDatabase, FirebaseObjectObservable } from 'angularfire2/database'; // for AngularFireAuth import { AngularFireAuthModule } from 'angularfire2/auth'; import { AngularFireAuth } from 'angularfire2/auth'; @NgModule({ imports: [ AngularFireModule.initializeApp({ <---- main module apiKey: ..., authDomain: '...', databaseURL: '...', storageBucket: '...', messagingSenderId: '...' }), AngularFireDatabaseModule, <---- for database AngularFireAuthModule <---- for auth ] })
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With