In polymer 0.5, this.templateInstance.model provided a way of accessing properties defined in the scope of an encompassing is="auto-binding" (or any other) template of this element.
Now, in polymer 1.0 what is the equivalent way of accessing properties of the encompassing is="dom-bind" (or any other) template?
EDIT:
For example, in the snippet below both elements <my-el-a> and <my-el-b> intend to set values to the encompassing <template is="dom-bind">'s counterA and counterB properties respectively.
<my-el-b> does so succesfully via a reflective property counter (notify:true).
<my-el-a> intends to do so via the "parent"/templateInstance.model but fails. This used to work in Polymer 0.5. How can I get this to work in Polymer 1.0? In other words, what's the equivalent for templateInstance.model?
<script>
! function() {
var counterA = 0;
Polymer({
is: 'my-el-a',
ready: function() {
counterA += 1;
this.instanceTemplate.model.counterA = counterA; //used to work in Polymer 0.5
}
})
}();
</script>
<script>
! function() {
var counterB = 0;
Polymer({
is: 'my-el-b',
properties: {
counter: {
value: 0,
type: Number,
notify: true
}
},
ready: function() {
counterB += 1;
this.counter = counterB;
console.log(this);
}
})
}();
</script>
<template is="dom-bind">
<div>CounterA: <span>{{counterA}}</span>
</div>
<div>CounterB: <span>{{counterB}}</span>
</div>
<my-el-a></my-el-a>
<my-el-b counter="{{counterB}}"></my-el-b>
</template>