如何向Polymer SPA示例添加内容 [英] How to add content to Polymer SPA example

查看:76
本文介绍了如何向Polymer SPA示例添加内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于该文章 https://www.polymer-project.org/0.5/articles/spa.html 我想知道如何添加一些内容?
我知道有一个加载外部html文件的示例.但是如何在其他示例中添加我自己的内容?

regarding to that article https://www.polymer-project.org/0.5/articles/spa.html i want to know how to add some content?
i know there is an example which loads external html files. but how to add my own content in the other examples?

谢谢

亲切的问候
维多利亚

kind regards
Viktoria

推荐答案

在您链接的页面上,有一个标题为然后放入您的内容:"

on the page you linked there is a section headed "then drop in your content:"

然后加上此代码.

 <div layout horizontal center-center fit>
  <core-animated-pages  selected="0" transitions="slide-from-right">
    <section layout vertical center-center>
      <div>Single</div>
    </section>
    <section layout vertical center-center>
      <div>page</div>
    </section>
    ...
  </core-animated-pages>
</div>

在该代码中,每个小节标签都是一个差异页面,并且该页面的内容在随附的div标签中.<div>Single</div>替换该标签以更改应用程序内容.也许还有助于查看该示例中使用的元素的文档,以便您更好地了解它们的工作原理.

in that code each section tag is a diff page and the content of that page is in the enclosed div tag <div>Single</div> replace that tag to change the app content. it might also help to look over the documentation on the elements used in that example so you have a better understanding of how they work.

动画页面 https://www.polymer-project.org/0.5 /docs/elements/core-animated-pages.html

这篇关于如何向Polymer SPA示例添加内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆