UP TO DATE(Ver 5.0.0-rc3):
While getting this error, this means you are using old Database API. This can solved by importing FirebaseListObservable
from depracated module(See also @Ashish Jha answer):
import { AngularFireModule } from 'angularfire2';
import { AngularFireDatabase, FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database-deprecated';
It's recommended to use the latest API since AngularFire 5.0 brings new API for the Realtime Database. Refer upgrade guide.
ORIGINAL ANSWER:
AngularFire2 has separate its modules since 4.0.0+.
you can import those two module if you want use auth of angularfire2, see their change log :
import {AngularFireModule} from 'angularfire2';
// for auth
import {AngularFireAuthModule} from 'angularfire2/auth';
// for database
import {AngularFireDatabaseModule} from 'angularfire2/database';
and import Auth
and Observable
(AuthMethods can be found in AngularFireAuth) type by:
// for auth
import { AngularFireAuth } from 'angularfire2/auth';
// for database
import { AngularFireDatabase } from 'angular2/database';
// for Observables
import {FirebaseListObservable, FirebaseObjectObservable } from 'angularfire2/database';
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…