本文整理匯總了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"
}
]
}