0

I have created three angular applications separately that have an individual workspace or individual projects and individual repositories.

I can share the modules among them by using the @angular-architects/module-federation. But I am unable to share the components and services.

How can I share the services and components among different workspaces or projects ?

Or

How can I implement Poly Repo based Angular Application?

Thank You.

App2

App1

1 Answers1

0

Use nx workspace, Which will allow you manage multiple repositories. There is a folder called 'libs'in workspace which we can add common module from there we can share components and services to all other repositories. Read nx documentation for more information. https://nx.dev/getting-started/nx-and-angular

  • How can we create that apps in nx workspace to have individual repos? – PUKKALLA GURUNADH Aug 24 '22 at 06:16
  • @PUKKALLAGURUNADH, install nx and use command "npx create-nx-workspace@latest" to create new workspace. 2nd step they will ask for the framework, you can select angular, react etc...., as 3rd step they will ask for application name you can provide application name. To create additional apps use "ng g @nrwl/angular:app " – John Hashim Aug 25 '22 at 07:17
  • How to make that apps to be in separate repositories? – PUKKALLA GURUNADH Aug 26 '22 at 08:03