https://github.com/embeddedenterprises/ngx-golden-layout-dynamic-library
Dynamically loaded library which can be used with electron and golden-layout
https://github.com/embeddedenterprises/ngx-golden-layout-dynamic-library
Last synced: 10 months ago
JSON representation
Dynamically loaded library which can be used with electron and golden-layout
- Host: GitHub
- URL: https://github.com/embeddedenterprises/ngx-golden-layout-dynamic-library
- Owner: EmbeddedEnterprises
- Created: 2019-07-23T12:36:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T08:02:47.000Z (over 3 years ago)
- Last Synced: 2025-07-29T07:54:56.034Z (11 months ago)
- Language: TypeScript
- Size: 2.88 MB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ngx-golden-layout-dynamic-library
This library demonstrates the build process and the lazy loading of dynamic libraries using ngx-golden-layout and angular ivy.
To get you started building an own library:
- Create a new library using `ng g lib YOUR_LIBNAME` (memorize the library name, it is important)
- If not done, install dependencies: `npm i -D ngx-golden-layout jquery golden-layout @types/jquery`
- Change `tsconfig.lib.json` in your module directory to state `enableIvy: true` under `angularCompilerOptions`
- Change `tsconfig.lib.json` in your module directory to state `jquery` under `types`
- Create your library, declare your components in your libraries main module using `forChild` (see example in `projects/demo-library/src/lib/demo-library.module.ts`)
- Run `ng build YOUR_LIBNAME`
After that, you should end up with a ready-to-use library which you can load in ngx-golden-layout.
To test it here, run
- `npm ci`
- `ng build demo-library`
- `cd dist/demo-library/bundles`
- `ls`, to get the filename
- run an http server (e.g. `python -m http.server`)
When you're running the ngx-golden-layout-electron project, you might serve the demo library as follows:
