1
私はfirebaseに以下の構造を持っており、私はユーザーのクライアントの名前を取得しようとしています。2つ以上のfirebase要素をどのように入れ子にすることができますか?
このコードは、任意の名前を表示しない、それは私が二firebase要素が非同期的にそれを持つ前にclient.__firebaseKey__
を使用しているため、私の問題であることを推測する、でもクロムインスペクタをクラッシュします。
Polymerのドキュメントには、要素を同期的にレンダリングする方法を知らせるpageがありますが、動作しませんでした。
<template is="dom-bind">
<firebase-collection
location="https://periodiza.firebaseio.com/user/-KHkue7mLaVe1b_bO3Zb/clients"
data="{{clients}}"
></firebase-collection>
<template is="dom-repeat" items="[[clients]]" as="client">
<firebase-document
location="https://periodiza.firebaseio.com/user/{{client.__firebaseKey__}}/name"
data="{{clientName}}"
></firebase-document>
<a class="paper-item-link">
<paper-item raised>[[clientName]]</paper-item>
</a>
</template>
</template>
firebase_authからまだログインしていませんか?あなたのコレクションにアクセスできません。 – getbuckts
これは一般公開されているかどうかはわかりませんが、FirebaseサイトではなくAPI経由でアクセスできるはずです。 –
新しいFirebase APIが[複数のログイン方法](https://firebase.google.com/docs/auth/web/account-linking)をサポートしているので、データベースが少し変わります。 –