the below code not show in browser. works in polymer 0.5. there code difference using 1.0?:
<link rel="import" href="../bower_components/polymer/polymer.html"> <polymer-element name="my-name"> <template> <h1> hello {{name}}</h1> </template> <script> polymer('my-name', { ready: function() { this.name = "brown"; } }); </script> </polymer-element>
basically need rewrite element based on new requirements. can follow in migration guide, registration element section.
you should rewrite following:
<dom-module id="my-name"> <template> <!--keep in mind in polymer 1.0 can't have whitespaces in bound tags--> <h1>hello <span>{{name}}</span></h1> </template> <script> polymer({ is: "my-name", ready: function () { this.name = "brown"; } }); </script> </dom-module> i did plunker can reproduce it.
Comments
Post a Comment