2017-01-28 160 views
2

我想用neon-animated-pages飛鏢聚合物綁定屬性

切換頁面所以我的代碼很簡單:

<dom-module id="auth-view"> 
    <template> 
    <style> 
    </style> 
     <neon-animated-pages class="neon-container" selected="[[selected]]"> 
      <login-page></login-page> 
      <pwd-reset-page></pwd-reset-page> 
     </neon-animated-pages> 
    </template> 
</dom-module> 

,並在DART代碼:

@property 
int selected = 0; 

StreamSubscription _clickSubscription; 

attached() { 
    _clickSubscription = this.on['showPwdReset'].listen((e) { 
    e = convertToDart(e); 
    // Read things from `e`. 
    print("Got show Event!"); 
    selected = 1; 
    }); 
} 

所以,我趕上事件 - 我可以在控制檯中看到。但是頁面不會改變。

我仍然可以通過在shadow-dom中添加選定項來手動更改它。

有什麼問題?

回答

相關問題