Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

hydraslay/ng2-polymer-static

Repository files navigation

ng2-polymer-static

This project is a collection of generated static directive of polymer element. For those who want to build with latest ng2-cli (JIT or AOT).

There is a list of generated in /src/index.html, and a simple page which has each of the element.

You can also generate for other elements by using the generator

AOT compile is available

if you make new directive files they need to modify after generated. (the directives already in this repository is done)

for example: If there is a @Directive({ selector: 'paper-button', outputs: ["activeChange", "focusedChange", "disabledChange"],

you should add property activeChange: any; focusedChange: any; disabledChange: any; in that directive class. (if there is outputs/inputs)

of course if you don't add the properties, ngc will tell you to do so, by error messages.

To Install (AOT)

All needed tools already in the package.json.

Run npm install and bower install.

and install the lite-server for serve: npm install -g lite-server

To Build AOT

Run npm run build:aot

To serve AOT

Run node copy-dist-files.js only once (aleady done, do it again if you changed the files).

Run npm run serve:aot to serve.

(the JIT is still available in the same project folder so you can compare the load performance.)

to do with JIT

Run npm install and bower install.

Run ng build to build. (If it say you should install latest angular-cli, do it.)

Run ng serve for a dev server. Navigate to http://localhost:4200/.

About

static directive for angular2-cli (webpack)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published