首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Dart聚合物粘合性能

Dart聚合物粘合性能
EN

Stack Overflow用户
提问于 2017-01-28 09:53:13
回答 1查看 75关注 0票数 2

我想使用neon-animated-pages切换页面

所以我的代码很简单:

代码语言:javascript
复制
<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代码中:

代码语言:javascript
复制
@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中添加选定内容来手动更改它。

有什么问题吗?

EN

回答 1

Stack Overflow用户

发布于 2017-01-29 04:23:50

页面项目应该使用<neon-animatable>进行包装,如下所示:

代码语言:javascript
复制
    <neon-animatable><login-page></login-page></neon-animatable>
    <neon-animatable><pwd-reset-page></pwd-reset-page></neon-animatable>

有关更多信息,请访问https://www.webcomponents.org/element/PolymerElements/neon-animation/neon-animatable

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41905626

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档