2015-04-02 71 views
-1

我不知道如何将Polymer标记和UI组件插入Jade文件,如何呈现它,或者如何在网站上添加必要的脚本。你能帮助我吗?在.Jade文件中插入聚合物元素和脚本

+0

欢迎来到StackOverflow!如果你能解释你所尝试过的,以及你失败的地方,它会帮助我们帮助你!当然是 – 2015-04-02 21:50:35

+0

! 我跟着http://www.clock.co.uk/blog/a-simple-website-in-nodejs-with-express-jade-and-stylus 所以基本上我有工作模板。现在我安装了一个聚合物,我想使用它inisde layaout.jade文件,但我不知道如何将平面按钮放入layout.jade中。 – 2015-04-02 22:42:30

回答

2

最多可以装入webcomponents polyfills

script(src="bower_components/webcomponentsjs/webcomponents.js") 

导入聚合物和您要使用的元素。

link(rel="import" href="../bower_components/polymer/polymer.html") 
link(rel="import" href="bower_components/paper-button/paper-button.html") 

然后在您的玉模板中创建它的实例。

paper-button() flat button 
paper-button(raised) raised button 
paper-button(noink) No ripple effect