本文整理汇总了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}`);
}