本文整理匯總了TypeScript中angularfire2-offline/database.AngularFireOfflineDatabase類的典型用法代碼示例。如果您正苦於以下問題:TypeScript AngularFireOfflineDatabase類的具體用法?TypeScript AngularFireOfflineDatabase怎麽用?TypeScript AngularFireOfflineDatabase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了AngularFireOfflineDatabase類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
constructor(public navCtrl: NavController, public navParams: NavParams, afoDatabase: AngularFireOfflineDatabase) {
this.transactionID = this.navParams.get('transactionName');
this.jobcardID = this.transactionID.split(":")[0]
this.item = afoDatabase.object('/transactions/' + this.jobcardID + '/' + this.transactionID);
console.log(this.item)
}
示例2: resource
resource(type, id: string): AfoObjectObservable<Page> {
return this.afoDatabase.object(`client/${type}/${id}`);
}
示例3: onInit
/**
* Called when creating the service.
* - Gets the required items from Firebase to use in the app
*/
onInit() {
this.menu = this.afoDatabase.list('client/menu');
this.sermons = this.afoDatabase.list('client/sermons');
this.events = this.afoDatabase.list('client/events');
this.books = this.afoDatabase.list('client/books');
this.calendar = this.afoDatabase.object('client/calendar');
this.latestEvents = this.afoDatabase.object('client/latestEvents');
this.latestSermon = this.afoDatabase.object('client/latestSermon');
this.latestBook = this.afoDatabase.object('client/latestBook');
this.filterOptions = this.afoDatabase.object('client/filter');
this.eventsFilter = this.afoDatabase.object('client/eventsFilter');
this.booksFilter = this.afoDatabase.object('client/booksFilter');
this.slides = this.afoDatabase.list('client/home/slider');
this.homeInfo = this.afoDatabase.object('client/home/info');
this.features = this.afoDatabase.object('features');
}
示例4: getSermon
getSermon(sermonId) {
return this.afoDatabase.object(`client/sermons/${sermonId}`);
}