2
我正在嘗試編寫一個查詢,該查詢將從基於密鑰的集合中提取單個項目。
我一直在尋找和下面的教程很多,但一切似乎只是展示如何獲取列表如下圖所示:
我想在$鍵和查詢傳遞和拉一條記錄。任何建議或方向的來源,可以幫助將不勝感激。
import { Injectable } from '@angular/core';
import { Customer } from "./customer";
import { AngularFire, FirebaseListObservable} from 'angularfire2';
@Injectable()
export class CustomerService {
customer: Customer;
customers: FirebaseListObservable<Customer[]>;
categories: FirebaseListObservable<Category[]>;
constructor(private af: AngularFire) { }
getCustomer(customerIndex: number) {
this.customers = this.af.database.list('customer');
return this.customers;
}
}
謝謝 - 我新的它會很簡單,真的很感謝你的幫助 – ccocker