Share a module between multiple angular apps that resides in the same project

Viewed 7585

This question has been asked before but needs more clarity, is it somehow possible to reuse modules or single components from a angular-cli app to another?

Since its now possible to have multiple apps i one angular-cli project, I took advantage by this to be able to build two different types of bundles for production.

My project looks like this:

src
 |─app-core
 |   |────shared
 |   |       |────share-this.component.ts
 |   |       |────shared.module.ts
 |   |       
 |   |────app.module.ts
 |   |────app-root.component.ts
 |   
 └─app-inspection
     |────app.module.ts (how do I use 'share-this.component.ts' here?)
     |────app-root.component.ts

When importing the SharedModule in the app-inspections AppModule the services isn't provided somehow.

I know a npm-package would solve my problem but I think it should be easier than this.

So, is there anyone who sits on a solution? Otherwise maybe a feature Angular could build?

Link to the other question

1 Answers
Related