How to route between Angular Apps in Nx Workspace? [closed]

Discussão em 'Angular' iniciado por Mozes22, Janeiro 22, 2025.

  1. Mozes22

    Mozes22 Guest

    I have an Nx workspace with two Angular apps: a public website and an admin dashboard, and I intend to build and deploy both apps independently.

    In the public website app's routes, I want to route users to the dashboard app when they navigate to /dashboard or any of its child paths. However, I can't directly import the dashboard app due to the @nx/enforce-module-boundaries rule.

    The development of both apps is being done separately, so the solution should allow independent workflows while maintaining the ability to dynamically load the dashboard from the public site.

    How should I go about implementing this? Is Module Federation the best choice here, or are there other alternatives within Nx to achieve this setup?

    apps\website\src\app\app.routes.ts [​IMG]

    Continue reading...

Compartilhe esta Página