//Component Object Component({ options: { styleIsolation: 'isolated' }, properties: { msg:{ type:String, value:'', observer(a,b){ console.log('msg changed: ', a, b); this.setData({ name: Math.random() }) } }, }, data: { name: 'Thanos' }, methods: { log(){ console.log('I am logger', this.properties.msg) this.triggerEvent('childEvent', new Date().getTime()) }, }, observers:{ name: function(a){ console.log('name changed', a); } }, created: function(){ console.log('component created'); }, attached: function(){ console.log('component attached'); }, ready: function(){ console.log('component ready'); }, moved: function(){ console.log('component moved'); }, detached: function(){ console.log('component detached'); }, });