/angular-custom-elements

An example application to show how angular elements /web components can be created and used in non-angular projects (as local file).

Primary LanguageTypeScript

Web Components with Angular 6 Elements - Build as a single bundle

In this example, I have created two custom elements, my-alert and my-button which are built as single bundle which is used in plain html file (non angular).

This project is built using default Angular CLI setup

Commands:

  • npm run build && npm run package to create a build of a sample component
  • npm run serve to run a http-server with example usage (click the button, watch the devtools console)

I have created this example by referring below article and youtube video. Thanks to Tomek Sułkowski and Academind Youtube channel!