简体   繁体   中英

how to use google polymer ui component in nodejs express app

I am working on nodejs express app. I want to include google polymer ui components in my express app.I tried a lot about integrating polymer in express app. I found no solution for this. Is there any way to integrate polymer ui component in express app ?

I used polymer webcomponents to create a node express server found on this: express-web-components

His tutorial shows how to use webcomponents to create a server, but you can clearly adopt that to your usecase and use ui components like the server ones. Note: To use the server-side web components, the ScramEngine offers access to the runtime.

Basically it is:

  1. Include polymer and your component like so:

<link rel="import" href="../../bower_components/polymer/polymer.html"> <link rel="import" href="../../bower_components/express-web-components/express-app.html">

  1. Use your component for example like so.

<express-app port="1234"> <express-middleware> </express-middleware> </express-app>

This is only for Polymer 2. Version 3 will be different from the import side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM