问题描述
道歉,因为我想不出包括所有信息的更好的方法...当我运行这个,我得到一个错误说下面。我已经按照Ionic Docs的T,我不能找出什么可能是错的。错误:
Package.json
App.module.ts
Home.html
Home.ts
与AngularAuth相同)从
版本分开为它自己的模块 AngularFireDatabaseModule
(AngularFireAuthModule for AngularAuth ) > [email protected] ,请参阅 documentation 。
您应该在 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: Package.json App.module.ts Home.html Home.ts you should import 这篇关于没有AngularFireDatabase,AngularFireAuth的提供者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! RootModule $ c中导入
AngularFireDatabaseModule
( AngularFireAuthModule for Authentication
$ p $ 从'angularfire2'导入{AngularFireModule};
//用于AngularFireDatabase
从'angularfire2 / database'中导入{AngularFireDatabaseModule};
从'angularfire2 / database'导入{AngularFireDatabase,FirebaseObjectObservable};
//用于AngularFireAuth
从'angularfire2 / auth'中导入{AngularFireAuthModule};
从'angularfire2 / auth'导入{AngularFireAuth};
@NgModule({
imports:[
AngularFireModule.initializeApp({< ---- main module
apiKey:...,
authDomain:'...',
databaseURL:'...',
storageBucket:'...',
messagingSenderId:'...'
}),
AngularFireDatabaseModule,< ---- for database
AngularFireAuthModule< ---- for auth
]
})
AngularDatabase
(same for AngularAuth) is separated to its own module AngularFireDatabaseModule
(AngularFireAuthModule for AngularAuth) from version [email protected], see documentation here.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
]
})