2015-05-20 55 views
3

我使用聚合物0.9,我有這個模板。聚合物0.9陣列推重複模板

<template> 
    <ul> 
     <template is="dom-repeat" items="{{menuPages}}"> 
      <li class="c-text"> 
       <span>{{item.title}}</span> 
      </li> 
     </template> 
    </ul> 
</template> 

當我使用這個片段來更新數據不加載

ready: function() { 
     this.menuPages.push({title:'hey'}); 
     this.menuPages.push({title:'hey2'}); 
    } 

但是這個作品

ready: function() { 
     this.menuPages = [{title:'hey'}, {title:'hey2'}]; 
    } 

Working Example

Not Working Example

+0

的官方文檔是非常糟糕的。 – GutenYe

回答