mehdi shahdoost
mehdi shahdoost

Reputation: 1489

create angular library from whole angular's app

I work on angular 5 application that use material module as a UI interface, i create template for all my projects and i want projects use this application as a library and my changes to general part of template [sidebar, navigationbar] update on library and apply to all projects. is this a good pattern? if this possible, how to do this in angular 5?

Upvotes: 0

Views: 237

Answers (1)

Vikas
Vikas

Reputation: 12036

If you want to create a reusable library you can use ng-packagr ng-packagr is a node library that can compile and package a TypeScript library to Angular Package Format. it is commonly used for pulling components out of CLI project and package them up into a format that can be used within other Angular applications.
execute npm install ng-packagr --save-dev

Refer this Building an Angular 4 Component Library with the Angular CLI and ng-packagr.

Upvotes: 1

Related Questions