What is best way to reuse components or modules in multiple projects in angular?
Thanks for your answers and have a great day
What is best way to reuse components or modules in multiple projects in angular?
Thanks for your answers and have a great day
You can't if your Angular applications are individual projects. In the case of Java, we could reuse JARs in multiple projects if there are no Java version compatibility issues. However, in the case of Angular such things are not possible.
What you should be looking for is a monorepo setup. Here, the only constraint is all your Angular applications need to be in the same Angular version. If you want to reuse code between different applications, you can create libraries and multiple applications can reuse code from the library. There are some mono-repo setups available, you may try our some.
I was looking for the same topic and came across this: https://blog.bitsrc.io/how-to-share-angular-components-between-project-and-apps-5eb0600d99d2 To me this is quite a bit of a setup to achieve only a local sharing of modules (in my case), so i ended up keeping folder structure similar between the projects and do copy-paste...I know, not very satisfying.