Assets‎ > ‎

pm

<dom-module id="xm-infowindow">
  <style>
  </style>  
  <template>
    <div>Name: {{item.properties.Name}}</div>
    <paper-button on-click="_test">Test</paper-button>
    <paper-button on-click="_set">Set</paper-button>
  </template>
  <script>
    Polymer({
      is: "xm-infowindow",
      properties: {
        item: {type:Object, notify:true },
      },
      _test: function(e){
        console.log("Click from IW " + JSON.stringify(this.item));
      },
      _set: function(e){
//        this.item.properties.Name = "New Name"; // do instead as follow
        this.set("item.properties.Name", "New Name");
      },
    });
  </script>
</dom-module>
Comments