ポリマーに新しくなりません。お互いに通信する2つの異なるポリマー成分を使用している。私はそれを2回(2×2コンポーネント)行う必要があります。同じページでポリマー成分のペアを2回使用すると、
次のコードでは、さまざまなコンポーネントのひとつペアを使用し、それが動作します:
<dom-bind id="dombind">
<template is="dom-bind">
<polymer-componentA id="polymercomponentA_1"
attribute="[[x]]"
attribute="[[x]]"
attribute="{{x}}">
</polymer-componentA>
<polymer-componentB id="polymer-componentB_1"
attribute="{{x}}">
</polymer-componentB>
</template>
</dom-bind>
しかし、私はコンポーネントの他のペアを追加するとき、それは悪い作業を開始します。私はこれはよくやっていないけど、私はこれについての良い例を見つけるいけない
<dom-bind id="dombind">
<template is="dom-bind">
<polymer-componentA id="polymercomponentA_1"
attribute="[[x]]"
attribute="[[x]]"
attribute="{{x}}">
</polymer-componentA>
<polymer-componentB id="polymer-componentB_1"
attribute="{{x}}">
</polymer-componentB>
</template>
</dom-bind>
<dom-bind id="dombind">
<template is="dom-bind">
<polymer-componentA id="polymercomponentA_2"
attribute="[[x]]"
attribute="[[x]]"
attribute="{{x}}">
</polymer-componentA>
<polymer-componentB id="polymer-componentB_2"
attribute="{{x}}">
</polymer-componentB>
</template>
</dom-bind>
:私は、彼らが同じコンポーネントを(代わりに独立しているの)使用と思います。 2つのポリマコンポーネントを使用する正しい方法は何ですか? ありがとうございます!
それはフィドルやあなたが直面しているどのようなエラーで表示することは可能ですか? – Ofisora
それは大きなプロジェクトですが、私は試してみます。私は属性が両方のコンポーネントの間で混在していると思う。 – Rashomon
両方とも同じ属性を使用しているので、変更すると他のものにも反映されます。あなたは何を達成しようとしていますか?参照してください。 – Ofisora