Closed pstjvn closed 9 years ago
If I have two templates that are mutually exclusive the one that is excluded when first evaluated does not populate the 'this.$' object with the corresponding IDs.
Example:
<polymer-element name="example-app"> <template if="{{a}}"> <div id="div1"></div> </template> <template if="{{!a}}"> <div id="div2"></div> </template> <script> Polymer('example-app', { a: false, ready: function() { setTimeout(function() { this.a = true; }.bind(this), 5000); setTimeout(function() { console.log(this.$); /* will be empty, should contain 'div1' */}.bind(this), 15000); } }); </script> </polymer-element>
Tested with latest master.
This issue is tracked at Polymer/polymer#642
If I have two templates that are mutually exclusive the one that is excluded when first evaluated does not populate the 'this.$' object with the corresponding IDs.
Example:
Tested with latest master.