firebase-document
을 사용하여 Firebase에서 데이터를 가져와야합니다. 이후 추가 처리가 필요합니다. 응답 페이로드를받습니다. 어떻게해야합니까?firebase-document를 사용하는 모든 예제
I read the documentation here, but there are no examples. transactionsComplete
이라는 속성이 있지만 다시 예제가 없습니다. promise
이므로 구현 방법이 불확실합니다.
누군가는 트랜잭션이 완료 후 요청 및 에 의해 반환 된 데이터를 처리 할 firebase-document
의 속성 또는 메서드를 사용하는 방법의 작업 코드 예제를 제공 주실 래요? 재산 data="{{object}}"
에 객체를 바인딩
<firebase-document
id="doc"
app-name="my-app">
</firebase-document>
<script>
_userChanged: function(u) {
if(u) {
var doc = this.$.doc;
var path = [ 'users' , u.uid ].join('/');
doc.path = path; // this should send a request for data
// but how do I ensure to process what is returned
// after and only after it comes back?
}
},
</script>