Add Angular Material to a custom library
问题 I want to write my own library and reuse it in other projects, so I created a new app and generated a library there: ng new lib-collection cd lib-collection ng g library first-lib --prefix va How to add Angular Material to my library? I wanted to use something like this: ng add @angular/material --project=first-lib But I got an error: Could not find the project main file inside of the workspace config (projects/first-lib/src) . What's wrong? 回答1: You don't need to add it there. You need to