Skip to content

An example for Angular workspace with a library and a consumer.

Notifications You must be signed in to change notification settings

milantenk/angular-workspace-example

Repository files navigation

Angular workspace demo

This workspace was generated with Angular CLI version 7.2.3.

The goal of this repo is to demonstrate an Angular workspace with a library and a consumer. It is used as demo for this stackoverflow question.

Build and Serve

After calling npm install run npm run build:lib and after that npm run start.

Creating such a workspace

Do following steps to create a workspace structure like this.

  • Create the workspace with following command:
ng new my-workspace --create-application=false
  • Navigate into the newly created workspace:
cd my-workspace
  • Generate the library:
ng generate library my-lib
  • Generate the application:
ng generate application my-app
  • Add MyLibModule to the app.module.ts of the application.
  • Update package.json with build:lib and build:app commands.

About

An example for Angular workspace with a library and a consumer.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published