0

I have developed an Angular 5 application(consider 'A') with webpack where I get 2 bundles(vendor.js and main.client.js) finally which I import in the index.html.

My scenario is I have another Angular 5 application(consider 'B') from which I should consume those 'A' application bundles. Intention is I have to import 'A' application service into 'B' and call a function, a kind of dependency injection. I don't have base idea on how to do this after several searches. Could someone please help me in giving a hint or reference out.Thanks.

Srini
  • 181
  • 1
  • 1
  • 6
  • Is your so called A an actual application or more like a library? – Robin Dijkhof Mar 12 '18 at 11:40
  • My 'A' is a actual application. 'B' is almost like a small module which is consumed by many major applications like 'A'. I have webpack bundles out of 'B'. I don't know how to inject them. – Srini Mar 12 '18 at 12:10
  • AFAIK there is no way to import an application into another. I would move the shared functionality to a shared library. – Robin Dijkhof Mar 12 '18 at 12:18
  • In Angular 1.x, we do use dependency injection to add a module into another app which was pretty straightforward. Since this is a migrated app from 1.x to 5 , I am wondering and much worried what would be a better way to do this? – Srini Mar 12 '18 at 12:22

0 Answers0