问题
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?
Thank you
kind regards
Viktoria
回答1:
on the page you linked there is a section headed "then drop in your content:"
then it is followed with this code.
<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>
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.
animated pages https://www.polymer-project.org/0.5/docs/elements/core-animated-pages.html
来源:https://stackoverflow.com/questions/29914357/how-to-add-content-to-polymer-spa-example