How in Angular two projects (same versioned) use different versions of the library?

Viewed 11

I have two projects in the Apps folder called App1 and App2. I have a folder called Libraries wherein multiple versioned library live.


├── Apps                    # Client Applications
│   ├── Libraries           # Where custom libraries live
│   ├── App1                # App one
│   └── App2                # App two
└──  

I will make a custom library with Angular CLI then will release to Libraries folder. Then from App1 and App2, I am going to use different versioned of the libraries. I can't use MonoRepo as I need a different version of the libraries in App1 and App2. What I am trying to do is making the shared components in App1 to be used in App2. Questions below.

  1. Theoretically, if we can manage those libraries just like npm versioned way, it might be possible but not sure how. Is there any source of how to do that?

  2. If the shared components have dependencies on Services or State, is that possible to make those components as shared libraries?

0 Answers
Related