I am trying to get two way data-binding between a host element and a template in Polymer using templatizer. For example if I am trying to keep two input boxes in-sync:
It beats my why I can never get neither _forwardParentPath
nor _forwardParentProp
to run. However, I know when the other two run :)
_forwardInstanceProp
runs for direct properties of model passed to stamp
and _instanceProps
is initialized:
this._instanceProps = {
text: true
};
var clone = this.stamp({
text: this.text
});
_forwardInstancePath
on the other hand runs when you pass nested objects to stamp
:
var clone = this.stamp({
nested: {
text: this.text
}
});
See this bin for an example: http://jsbin.com/kipato/2/edit?html,js,console,output
In the stamped template there are two inputs bound to two variables which trigger instanceProp and instancePath. Unfortunately I've been unable to fix the error thrown when the latter happens.