こんにちはにおけるポリマーの特定のデータとショー:コンポーネントでポリマー-firebase:私はFirebaseにこのような構造を持つユーザーのリストと相互に文書持つfirebase
を「父」私はすべての入手しますユーザー:値をバインドするpagado:
<template is="dom-repeat" items="{{usuarios}}" as="usuario">
<admin-consulta-pagos-item usuario="{{usuario}}" yearmes="{{yearmes}}" id="consultaspagos"></admin-consulta-pagos-item>
</template>
は、私が「子」コンポーネントと私は何をする必要があり、私は私が呼んプロパティウィッヒを持って、ユーザーがapears場合、特定のyear_monthで検索することです呼び出しますチェックボックスには表示されますが、console.logは正常に機能しますが、プロパティY doesntの:(私はこれをやってイム:
consultar: function() {
that = this;
var usuariocreado = this.fbref('/yearmes/' + this.yearmes + '/' + this.usuario.$key);
usuariocreado.once('value')
.then(function (snapshot) {
var a = snapshot.exists();
console.log('exist in DB: ' + a);
if (a) {
console.log('The user exist: ' + a)
that.pagado = true;
} else {
console.log('The user doesn't exist: ' + a)
that.pagado = false;
}
});
},
、最終結果、例えばこの場合には、すべてのチェックがアクティブでなければなりませんが、最後のものだけがための最良の方法であるか、正しい値を持っている:(これを解決する? 、あなたのCOMENTSのためにたくさんの感謝: