2016-02-15 55 views

回答

2

只需更换您铁杆网页:

<iron-pages selected="[[page]]" attr-for-selected="name"> 
    <my-view1 name="view1"></my-view1> 
    <my-view2 name="view2"></my-view2> 
</iron-pages> 

霓虹灯动画页面,并选择您的进入和退出动画:

<neon-animated-pages selected="[[page]]" attr-for-selected="name" fallback-selection="404" entry-animation="slide-from-bottom-animation" exit-animation="fade-out-animation"> 
    <my-view1 name="view1"></my-view1> 
    <my-view2 name="view2"></my-view2> 
</neon-animated-pages> 

安装霓虹灯动画与bower install --save PolymerElements/neon-animation

包含的元素:

<link rel="import" href="../bower_components/neon-animation/neon-animated-pages.html"> 
<link rel="import" href="../bower_components/neon-animation/animations/slide-from-bottom-animation.html"> 
<link rel="import" href="../bower_components/neon-animation/animations/fade-out-animation.html"> 

,你是好去。