White Trickster White Trickster - 3 months ago 16
Node.js Question

Inser Polymer elements and scripts in a .Jade file

I don't know how to insert Polymer tags and UI components to Jade file, how to render it, or how to add the necessary script on the site. Can you help me with that?

Answer

Load up webcomponents polyfills

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

Import Polymer and the element you want to use.

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

Then create instances of it in your jade template.

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