replace an angular spa by another angular spa

Viewed 29

I want to split my app into 3 different ones.

  • /home will be its own Angular App HomeApp
  • /details will be its own Angular App DetailsApp
  • /cart will be its own Angular App CartApp

I want to develop and deploy them independently. Is it possible to create an HTML page which loads the corresponding Angular App based on the route? e.g.

/home --> HomeApp will be loaded

if i navigate to /details then HomeApp will be removed from the DOM and DetailApp gets loaded.

Note: 2 angular applications do not coexsist at the same time. To me it would be sufficient to have 1 app in the dom at a time

1 Answers

Home, details, and carts are features of the same app. And as we already know we cannot deploy multiple apps on same domain. Switching angular app is still not a good choice even if it would be possible. If these 3 feature module would have been completely separate from each other , than we would have to deploy them on different domains (think google docs, sheets, drive etc)

As they are feature module , develop them as completely separate lazy loaded feature module . This way you can give these module to different teams to work on. For deployment , a basic CI continuous integration and proper version control would be enough.

Related