Thursday, 16 May 2019

Share a angular library across multiple projects

I am working on a angular 7+ project which is composed of backend + frontend. Now i am shot with a requirement where i need to create one more project which comprises of frontend+backend. But there are some reusable frontend code that is present which could be reused across both the application.

My Peoject Structure

Here

Requirement

Here

So when i read about library concepts i could find

1) Create two frontend Applications and share a common library

I cannot take this approach as i am using asp.net angular template project created through the visual studio (as shown Here). The two applications (Project One and Project Two) has its own FE+BE. Hence i cannot group two FE applications inside the same folder and make them use the shared library.

2) Create the library and upload to npm and use as dependency

I cannot take this approach as the code is proprietary and cannot be shared outside the network. Also there is no local corporate npm registry to use the corporate npm.

I know this could be done using a library concept. But i am not understanding how this could be done across multiple applications. Could someone help with a solution for this. Thanks !



from Share a angular library across multiple projects

No comments:

Post a Comment