聚合物1. *
<script>
AccountBehavior = {
properties: {
tabactivated: Boolean
},
observers: ['_refreshActivePosts(tabactivated)'],
_refreshActivePosts: function(tabactivated) {
if (tabactivated) {
console.log('sss');
this.$.account.refreshAjax();
}
}
}
</script>
selected-attribute="tabactivated"
来自铁页。
当此代码放在使用它的两个元素中时,观察者会正确触发。但是当放置一个行为并导入它时就不会开火。这是为什么?