本文整理汇总了TypeScript中angularfire2/angularfire2.FirebaseObjectObservable.subscribe方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FirebaseObjectObservable.subscribe方法的具体用法?TypeScript FirebaseObjectObservable.subscribe怎么用?TypeScript FirebaseObjectObservable.subscribe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angularfire2/angularfire2.FirebaseObjectObservable
的用法示例。
在下文中一共展示了FirebaseObjectObservable.subscribe方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(private af: AngularFire){
this.votes = af.database.object('/votes');
this.votes.subscribe((res) => {
this.dates = res;
});
this.dishes = [
{
"distance":"0.13808051082295206",
"restaurant_name":"Restaurace K The Two Brothers",
"rating":92,
"id_restaurant":2172,
"lat":50.0912692,
"long":"14.43358390000003",
"name":"Butter naan",
"description":"Indick\u00fd chl\u00e9b pot\u0159en\u00fd m\u00e1slem.",
"ammount":null,
"price":50,
"image_url":"https:\/\/www.restu.cz\/ir\/restaurant\/0db\/0db0d6d486eb69ed829b762f83e618f5.jpg"
},
{
"distance":"0.13808051082295206",
"restaurant_name":"Restaurace K The Two Brothers",
"rating":92,
"id_restaurant":2172,
"lat":50.0912692,
"long":"14.43358390000003",
"name":"Plain Roti",
"description":"Celozrnn\u00fd chl\u00e9b pe\u010den\u00fd v peci Tandoor.",
"ammount":null,
"price":40,
"image_url":"https:\/\/www.restu.cz\/ir\/restaurant\/0db\/0db0d6d486eb69ed829b762f83e618f5.jpg"
},
{
"distance":"0.1452246946411884",
"restaurant_name":"Bistro Tobruk",
"rating":83,
"id_restaurant":1262,
"lat":"50.09184385046584",
"long":"14.432612404264432",
"name":"Croissant",
"description":"s dom\u00e1c\u00ed marmel\u00e1dou a m\u00e1slem",
"ammount":null,
"price":49,
"image_url":"https:\/\/www.restu.cz\/ir\/restaurant\/283\/283537b3fd8e356d9ff13cd10dd39b1a.jpg"
}
]
}