Reputation: 9788
I am having a component in Angular which i am using Across my Application.
Application A is one project which uses component 1.
Application B is another project that uses component 1
Here component 1 is the common component across two different application. How can i utilize the common component without copying the files. Can we install the component while we do npm install
Can npm install download the package of common component if we have the common component url in the package.json
Upvotes: 3
Views: 1317
Reputation: 1078
I think using Bit will also do
Check here
https://codeburst.io/sharing-components-between-angular-applications-using-bit-707654263785
Upvotes: 1
Reputation: 22203
Create a Custom Angular Library, have Component 1 in it, build and publish.
Your library will be ready to be installed via npm
Check Documentation
Upvotes: 2