From the course: Creating Angular Libraries
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Local development for Angular schematics - Angular Tutorial
From the course: Creating Angular Libraries
Local development for Angular schematics
- [Instructor] As of Angular version 19.2, there's no automated way to link your library schematics to your app's workspace for local development. You'll need to use NPM to manually build and link your code. I opened our project here in a GitHub Codespace. I talk about why we use Codespaces earlier in this course, so for now, just think of them as an easy way to share and write code without installing anything on your local machine. Always build your library code before bundling the schematics. This prevents errors related to missing files or folders. I'll do that now from the command line, using the ng build command, passing in ngx-gem-finder as the target project to build. Next, you'll need to bundle your schematics into the output directory for your custom library. There are a few ways to do this, but I'm going to use the prefix option that comes with NPM so I don't need to change directories. In the terminal, I'll type npm run build -- prefix and pass in a relative path for the…