, . , , , AngularFire2 , , .
, :
import {AngularFireDatabase, FirebaseListObservable} from 'angularfire2/database';
import { AngularFireModule } from 'angularfire2';
import { AngularFire } from 'angularfire2';
, , , , , . , .
.
, :
app.module.ts:
import { AngularFireDatabaseModule } from 'angularfire2/database';
import { AngularFireModule } from 'angularfire2';
@NgModule :
imports: [
AngularFireModule.initializeApp(firebaseConfig),
AngularFireDatabaseModule
]
ts, . :
import {AngularFireDatabase, FirebaseListObservable} from 'angularfire2/database';
records: FirebaseListObservable<any[]>;
:
constructor(private navParams: NavParams, public nacCtrl: NavController, db: AngularFireDatabase){
this.records = db.list('/records');}