diff --git a/aio/content/guide/creating-libraries.md b/aio/content/guide/creating-libraries.md index 98f06d39dd..a86919439f 100644 --- a/aio/content/guide/creating-libraries.md +++ b/aio/content/guide/creating-libraries.md @@ -1,4 +1,4 @@ -# Creating Libraries +# Creating Libraries You can create and publish new libraries to extend Angular functionality. If you find that you need to solve the same problem in more than one app (or want to share your solution with other developers), you have a candidate for a library. @@ -13,9 +13,15 @@ A simple example might be a button that sends users to your company website, tha Use the Angular CLI to generate a new library skeleton with the following command: + ng new my-workspace --create-application=false + cd my-workspace ng generate library my-lib +
+

You can use the monorepo model to use the same workspace for multiple projects. See [Setting up for a multi-project workspace](guide/file-structure#multiple-projects).

+
+ This creates the `projects/my-lib` folder in your workspace, which contains a component and a service inside an NgModule. The workspace configuration file, `angular.json`, is updated with a project of type 'library'.