DEV Community

Kurapati Mahesh
Kurapati Mahesh

Posted on

3

Angular: Creating Angular Client Library

Download and install Node.js

Open Terminal or Command Prompt and check node version using command node -v

Now, type in npm install -g @angular/cli to install CLI

Check CLI version using ng --version

Create Angular workspace using ng new <app_name>

app_name consider as libraryApp

To create library init, use ng g library <library_name>

library_name consider as myLib

Inside the projects folder, go to mylib component inside myLib library.

Design reusable component in it.

Now, build that library using ng build <library_name>

Library gets generated in dist folder

Using this library in same application.

Import myLib module in app.module.ts of application

Access components or services of myLib library inside application and use wherever required in application

Now, do ng serve to check the application

Using in external application

ng new externalApp - Create new external application

In the ng build myLib log, dist folder locations are shown

take lib path and do npm i <path> inside new external application

Import myLib module in app.module.ts of application

Access components or services of myLib library inside application and use wherever required in application

Now, do ng serve to check the application

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series