I am new to polymer and am now reading a document. But I am confused about the following document:
(function() {
var values = {};
Polymer('app-globals', {
ready: function() {
for (var i = 0; i < this.attributes.length; ++i) {
var attr = this.attributes[i];
values[attr.nodeName] = attr.nodeValue;
}
}
});
})();
and then define global variables as follows:
<app-globals firstName="Addy" lastName="Osmani"></app-globals>
I tried this way, but I can not get any variables through app-globals, Valuethis is an absolutely local variable, because it is not with a start this., then how can I get the value through the Global application?
source
share