2016-11-06 85 views

回答

1

由於push現在返回一個可觀察到的,正確的方法來獲取生成$key(使用AF2)做如下:

let fb = this.af.database.list('/path'); 
fb.push('item').then(res => console.log(res.key)); 
相關問題