Angular 6 - Portal

Asked

Viewed 65 times

0

I need to create a portal style application in Angular 6. This application should be able to include other applications.

Explaining better: I have 3 applications:

  • APP1
  • APP2
  • PORTAL

Within the Portal there will be two menus, one for app1 and one for app2, when the user selects one of these menus the application should be displayed inside the portal and should run independently.

The user at some point may want to switch from app1 to app2 and the portal should allow to do so, keeping the two applications running side by side.

I have already researched and found 3 different solutions, each with its pros and cons:

  1. By modules
  2. By application
  3. By application within another application (New Angular 6 functionality)

These are the only solutions?

What is the best solution to solve this problem? Taking into account the following:

  • All applications will need to have components, services, directives, etc shared
  • The portal must be able to communicate with child applications (included within the portal)

Follow an Adobe XD link with an example to illustrate in a simple way what I want

https://xd.adobe.com/view/13f6f93c-35d0-4d43-5154-47aeaa62c3ec-65c7/? fullscreen

Thank you!

  • 1

    I believe that the best is to create modules and separate routes by modules so you can control the two applications by the portal.

  • 1

    Adding to the @Lucasbrogni case, you will need to use at least two router-outlets to do something similar to the example shown. And when you change the "tabs" of the system, you will need to store the variables in something like localStorage, in order to be able to go back to the old application by going back to new (Going from application 1 to 2, save the data of 1 and re-assign them to the variables when it returns to 1, saving the data of 2 in case it returns to it)

  • Thank you for your answers, The module solution was the one I already had as the most suitable, to keep the status of each application I already took a look at ngrx/store that allow to store the status of components. The only problem with this solution, for me, is that when a module/application has to be changed it is mandatory to publish the complete application.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.