私は以下のようなポリマー特性を持っています。
ガンマ:{type:Array,observe:true,notify:true,value: [{"id":1,"value":["w"]}, {"id":2,"value":["w "]}]}
そして、このプロパティを使用して、div を使用してテンプレートに行と列を表示しています。
<template is="dom-repeat" items="{{gamma}}" id="maindiv">
<div class="layout__row">
<template is="dom-repeat" items="{{item.value}}">
<div class="layout__block" id$="{{item}}">
<button class="btn btn--primary margins">Add {{item}} Button</button>
</div>
</template>
</div>
</template>
そして、ガンマ プロパティを変更して最初のオブジェクトにもう 1 つの値を追加し、notifysplices を呼び出すと、数値に従って div がレンダリングされません。add columns メソッドから render 関数を呼び出しています。
このコードを持つ addrows という別のメソッドがあります。
addRows: function(){
this.push("gamma", {"id":this.rows.length+1,"value": ["w"]} );
this.$.maindiv.render();
this.$.rowdiv.render();
}
私がここに欠けているもの。
サブプロパティまたはネストされた配列の変更は次のようになります。
this.push(["ガンマ", i, "値"], "a");
クレジットは、polymer.slack.com の Arthur Evans に贈られます。