mirror of
https://github.com/jlengrand/polymer-array-bubble-up-example.git
synced 2026-03-10 08:41:23 +00:00
36 lines
915 B
HTML
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> |