This project shows Angular's capabilities in creating extensible applications.
With the help of so-called "plugins" we can freely extend existing production applications.
Knowing only the name of the "Plugin" compressed file and the name of the main Module.
- installed Node with v12.3.1+
- installed Angular CLI v8.2+
root
- Root application project. Application that will be expanded.root/projects
- Place for source code for internal plugins created byng create liblary ...
(First way)plugins-config
- Small application aimed at serving configuration data and plugin files.external-plugins/projects
- Place for source files for external plugins (Second way)
-
Go to directory
root
-
Run command
ng serve
-
Open your browser with link http://localhost:4200/ (it should no display any loaded plugins on list)
-
Go to directory
plugins-config
-
Run command
http-server -p 8080 --cors
-
Run command (still on
root
directory)ng build plugin-a
-
copy bundled file
dist/plugin-a/bundles/plugin-a.umd.js
toplugins-config/plugins
directory -
Press
F5
on browser with loaded application (plugin a should be displayed on list of plugins routes links) -
Click on
Plugin a
link to check if plugin works will be loaded correctly.
10 For external plugins do the same as in points 4-7 but start from external-plugins
directory.
-
Checkout to feature-injecting-plugin-component` branch.
-
Run command (still on
root
directory)ng build plugin-a
-
copy bundled file
dist/plugin-a/bundles/plugin-a.umd.js
toplugins-config/plugins
directory -
Go to directory
plugins-config
-
Run command
http-server -p 8080 --cors
-
Go to directory
root
-
Run command
ng serve