angularangular-clilibraries

How to generate library in a specific folder with angular-cli?


I am using angualr7 with angular-cli and I am able to create new library with the following command.

E:\Coucou>ng generate library my-lib

By default it will add it under the project folder,but I need to generate the library under a sub folder of projects. Is there a way to do with angular-cli?


Solution

  • I had this same issue and solved it by scoping to the subfolder.

    ng generate library @subfolder/my-lib