0

I have an App1 created by angular-CLI and distributed to a C# project like so. C:...\CSharpProj1\AngularApp1\dist

I created another App2 using CLI. I would like to distribute the transpiled js to C:...\CSharpProj1\AngularApp2\dist

I would like to boostrap both apps in a single C# .cshtml page at the same time, and need App2 emit an event to be handled by App1. I am doing this because we have several developers maintain different CLI projects. I don't want to merge their project source into my project source, nor vice versa. In other words, I don't want to copy source code from one project to anther. The TypeScript source code needs to remain in its original CLI project, no merging two CLI projects into one.

Is this possible? Thanks.

user266909
  • 1,841
  • 3
  • 32
  • 58

2 Answers2

0

In case if you want to have an Angular project that has multiple apps so you can run the build of a particular app,then please visit this article https://yakovfain.com/2017/04/06/angular-cli-multiple-apps-in-the-same-project/

Now for your second question that you need App2 to emit an event that needs to be handled by App1 then you need to create a shared module and with that module you communicate to both the apps,please visit this article

https://stackoverflow.com/questions/44017813/share-a-module-between-multiple-angular-apps-that-resides-in-the-same-project
Abhishek Sharma
  • 360
  • 1
  • 10
0

You are talking about multiple SPA If I am correct. Please Check this one.

https://github.com/CanopyTax/single-spa

ngWolf
  • 307
  • 1
  • 6
  • 21