We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, i've tried some tutorials and i've found something weird i don't understand : On my index.html i've declared into the body
<my-component/><my-component/>
thus, i've hoped my component appears twice. In fact,it appears only once in chrome.
But If i had written into the body
<my-component></my-component><my-component></my-component>
my component would appear twice in chrome!
Here my polymer elements
<link rel="import" href="../bower_components/polymer/polymer.html"> <polymer-element name="app-globals" > <script> (function() { var values = {}; Polymer({ ready: function() { this.values = values; for (var i = 0; i < this.attributes.length; ++i) { var attr = this.attributes[i]; values[attr.nodeName] = attr.nodeValue; } } }); })(); </script> </polymer-element> <polymer-element name="my-component"> <template> <app-globals id="globals" firstname="Addy" lastname="Osmani"></app-globals> <div id="firstname">{{$.globals.values.firstname}}</div> <div id="lastname">{{$.globals.values.lastname}}</div> </template> <script> Polymer({ ready: function() { console.log('Last name: ' + this.$.globals.values.lastname); } }); </script> </polymer-element>
The text was updated successfully, but these errors were encountered:
I wish it was because it's html but not xhtml However, If the use of empty element is incorrect why my component appears on the page?
Sorry, something went wrong.
Only certain HTML Elements can be self-closing according to the HTML parser. Therefore, custom elements always need to be of the form:
<my-component></my-component>
<my-component/> will not work. More info: #628
<my-component/>
Thanks Eric! I was wondering about this.
No branches or pull requests
Hi,
i've tried some tutorials and i've found something weird i don't understand :
On my index.html i've declared into the body
thus, i've hoped my component appears twice. In fact,it appears only once in chrome.
But If i had written into the body
my component would appear twice in chrome!
Here my polymer elements
The text was updated successfully, but these errors were encountered: