Files
polymer-array-bubble-up-exa…/app/components/another-component/another-component.html
Julien Lengrand-Lambert 64700e5ebd Adds name changing
2017-08-16 16:41:52 +02:00

36 lines
915 B
HTML

<link rel="import" href="/polymer/polymer.html">
<link rel="import" href="/paper-button/paper-button.html">
<dom-module id="another-component">
<template>
<style>
:host {
display: block;
}
</style>
<h3>{{element.name}}</h3>
<h4>{{element.person.name}}</h4>
<paper-button on-tap="_changeName">Change name!</paper-button>
</template>
<script>
Polymer({
is: 'another-component',
properties: {
element: {
type: Object,
notify: true
}
},
_changeName: function(){
this.set('element.person', {"name": "bobby"});
this.notifyPath(element);
this.notifyPath(element.person);
}
});
</script>
</dom-module>