Skip to content

sanojantonyfico/dynamicdiscovery-angular-elements

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Dynamic discovery and rendering of angular elements

This project was generated with Angular CLI version 6.1.4.

The primary aim is to simulate integrating three angular elements from three different teams into a common app. Currently the integrator is a simple html file.

This project will be updated to make the integrator an angular app. dynamicdiscovery project will become that integrator and will add ngx-build-plus to provide partial web-pack files. This allows us to have a single app supply all dependencies rather than each angular element coming with their dependencies and messing up the final app.

So currently this project has three angular element library projects,

  • dynamicelement1
  • dynamicelement2
  • dynamicelement3

and for each library there is a partial angular app which bootstraps a component from the library. Partial apps are

  • dynamicdiscovery1 (src-dyn1)
  • dynamicdiscovery2 (src-dyn2)
  • dynamicdiscovery3 (src-dyn3)

The main app source is src. Not used at this moment. but will be used when ngx-build-plus is added.

Demo server

Once packaging is done, a webserver will be serving index.html from elements-demo folder using gulp webserver at port 9080.

Build

Run npm run package-elements for production build of all angular elements, all bootstrap partial apps and then packaging angular element js files. extractCss has been turned off so only js files are generated.

Run npm run package-elementsdebug for building a debug version which allows better debugging and to see clear error messages.

Both commands will build and launch a demo web page, which renders a UI, which displays a list of angular elements you can select and render.

Note: ShowAll is not implemented. After each selection and rendering, click refresh button to reset the state. There is a name collision with createCustomElement. Eventually we wanted to support show all option where all dynamically loaded angular elements can be displayed at once.

## Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

About

Dynamic discovery and integration of angular elements across multiple teams

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published