Hi Ionel,
From Steve:
....Polymer does not currently observe object or array mutations directly as dependencies. However, if a property that is an object or array itself changes, this will be noticed.
There is one exception to this which is an array that is repeated. That array is observed for array mutations (additions/removals)....
So even if you just have <p>items(buggy): {{ data }}</p>, the value won't update when you remove an item. The data array itself is not changing. <p>items: {{ data.length && data|json }}</p> works because the data's .length property is a dependency in the expression. When the array is mutated, data.length changes, thus evaluating the expression. See the explanation in the
last paragraph here.
One workaround is to re-evaluate the expression using this approach:
<template repeat="{{ item in data | addone }}" if="{{data.length}}">
or do a full re-assignment of the array at the right time:
this.data = this.data.splice(0);