This is an Angular workspace that contains:
- Two sample libraries with three Angular components
- Angular demo application with one component showing the three Angular components exchanging data
- The same native page with Web Components compiled from Angular components
- Project "elements" with compilation from Angular to Web components
ng serve
— start an Angular demo app with Angular componentsnpm run build:elements
— build single JS file Web Components from Angular components
-
angular.json contains configuration of application for Angular Elements compilation
-
package.json contains:
[email protected]
@angular/elements
added usingng add @angular/elements --project=elements
command@angular-builders/custom-webpack
added usingng add @angular-builders/custom-webpack --project=elements
commandbuild:elements
script
-
'elements' project contains several scripts for easy building proccess
-
ElementModule — abstract class implementing the whole Angular Element adding process
-
native-demo page — an example with three bundled Web Components exchanging data