Closed chrisbu closed 11 years ago
It may be the way I'm using it, but it seems that binding now only works when the bind property is encompassed by a node.
<template id="my-template" bind> <!-- expect "Hello World" to be output --> <h2>Hello <span>{{ name }}</span> </h2> <!-- works in master --> <h2>Hello {{ name }} </h2> <!-- broken (works in stable) --> </template> <script> document.addEventListener('DOMContentLoaded', function() { var t = document.querySelector("#my-template"); t.model = { name: 'World' }; Platform.performMicrotaskCheckpoint(); }); </script>
The error thrown is
Exception caught during observer callback: TypeError: Cannot read property 'node' of undefined
and it comes from this line: https://github.com/Polymer/mdv/blob/master/src/template_element.js#L187
this.node[this.property] = this.filterModelValue(value);
where this is undefined.
this
I believe this is now fix. Please re-open if it's not. Sorry for the breakage.
Working fine now - thanks.
It may be the way I'm using it, but it seems that binding now only works when the bind property is encompassed by a node.
The error thrown is
and it comes from this line: https://github.com/Polymer/mdv/blob/master/src/template_element.js#L187
where
this
is undefined.