Event-Based Routing for Angular Micro Frontends

Event-Based Routing for Angular Micro Frontends

There is one conclusion: Changing the routing between individual micro applications should not reload the page but should let each micro application to know that routing responsibility is delegated to them.

Introduction

In one of my previous articles, I described how to run two Angular applications in one window context. The reason why we might do this could be that we’re adopting the micro frontends architecture. Obviously, the micro frontend architecture is a big deal, and we must be confident that we will be able to face all the challenges. One of the micro frontend challenges is routing between particular micro applications.

Routing in Shell Application

Honestly, we must say that in the micro frontend architecture, we deal with two types of routing:

  • Internal routing inside the particular micro application
  • External routing in the shell layer between different micro applications

As long as internal routing is not problematic at all, because it is usually handled out of the box by the framework that we choose as the basis of a micro application, external routing can be a challenge.

Why it might actually be a challenge and what we want to achieve

The end user does not care about our architecture and what technical solution we have got underneath. The user wants to have an impeccable experience when using an application. Users are accustomed to an SPA experience, and if they move between different parts of the application (different micro app fragments), it should not disturb their feeling of unification.

There is one conclusion: Changing the routing between individual micro applications should not reload the page but should let each micro application to know that routing responsibility is delegated to them.

programming angular typescript javascript nodejs

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

JavaScript Vs TypeScript

Get to know here difference between JavaScript & TypeScript, In this blog explained with pros and cons of TypeScript & JavaScript.

Install Angular - Angular Environment Setup Process

Install Angular in easy step by step process. Firstly Install Node.js & npm, then Install Angular CLI, Create workspace and Deploy your App.

Typescript — Hello World Program

In this lesson, we are going to learn about the basic structure of a TypeScript program and understand a few concepts of the compilation process. Then we will see how we can run the compiled JavaScript program using node and ts-node.

Basics of Angular: Part-1

What is Angular? What it does? How we implement it in a project? So, here are some basics of angular to let you learn more about angular. Angular is a Typesc

Are Angular and Angular JS The Same?

In this article, we figure out the key differences between Angular and AngularJS open source tools for front end developers to make the usage of these frameworks, terms, and names more conscious. But before we start to compare, let’s clarify what these names mean.