Building Angular Library: A Comprehensive Tutorial for Creating Reusable Components

preview_player
Показать описание
Learn the complete process of creating, building, and exporting Angular library with this comprehensive tutorial. Gain hands-on experience as you dive into the steps involved in creating a custom library from scratch. Discover how to structure your code, define reusable components, and effectively manage dependencies.

TIMESTAMPS
0:00 Introduction
1:00 Generating Angular library
2:35 Angular library structure
4:09 Adding own stuff
5:26 Building a library
6:58 Using a library
8:22 Publishing a library

MOST POPULAR COURSES

FOLLOW ME

REFERENCES
Рекомендации по теме
Комментарии
Автор

Thanks a lot Monsterlessons Academy. Great contents !!!

titokris
Автор

Thank you so much!
In angular project, we can update a package like: ng update @angular/core
How to update package in a library?

digitaldaridesatv
Автор

Great idea. Please make a payed course with monorepo, libs, multiple projects, etc.

valikonen
Автор

Perfect timing! I wanna do something like this soon.

I do however have a question. I have a project with a core, feature(s) and a shared module.
Every feature imports the shared module.
I'm going to move all the components, directives etc from the shared module into the angular library so I can be used in multiple projects.
Do I now put the Library module inside the shared module (sort of becomes wrapped) or do I directly use the library module inside the features?
Because the shared module will be pretty empty and useless after moving everything into the lib module.
Any suggestions or tips on how to approach this?

zertyfield
Автор

But how does this work with multiple components though? I'm trying to have a library where I can have like 30-40 custom components if necessary. This only allows for one component because we only have the one file that was generated in our `lib` folder?

dg-cggi
Автор

hi, is there any way to use global css variables through all the components of the library in order to create different themes?

marcolmos
Автор

Getting NG023 while consuming library locally

dhanilaev
Автор

Have you already achieved 100% coverage using Library?

arozendojr
Автор

Для учбових відео краще використовуй Visual Code в дефолтному вигляді, бо в цьому редакторі що в тебе погано сприймається файлова структура, і в нумерації строк кода теж погано орієнтуватись... Це прям очевидно...

olehandershevchuk
Автор

there's nothing new compared to the other tutorials

there's no info about adding dependencies, handling multiple style files(especially from dependencies), handling config injection etc

IamAsphalt
Автор

his content is really good, however his accent is not really easy to listen to

clockwise
Автор

Seems like modules are no longer there when libraries are installed now and all components are standalone by default. Do we have to import each component in the public-api?

PraveenJoshua