As Angular applications grow in size and complexity, maintaining a single, monolithic frontend can become challenging, especially when multiple teams need to develop, deploy, and maintain different parts of an application independently. Micro-frontends address this challenge by breaking a large frontend application into smaller, independently deployable applications. In this practical guide, we will explore how to implement Native Federation in Angular to build a micro-frontend architecture.
In the micro-frontend architecture an application consists of a central application called Shell (also called host or container) and multiple independent Remotes (indvidual micro-frontends)
We will walk through the key configuration, and implementation steps to understand how separate Angular applications can work together as a unified user experience.
So , basically for a demo we will be building a host application , which will contain a home page component and a link to a micro-frontend application ‘todo’ :

Setting up your workspace
So , to start let’s create a new workspace, by using the following command :-
ng new my-workspace --create-application=false
Generate the shell application
After creating the workspace , run the following command in your workspace folder to generate an application named shell:
ng g application shell --prefix app-shell
Generate the remote application
Now in your workspace folder, run the following command to generate another application named todo
ng g application todo --prefix app-todo
Install native federation package
npm i -D @angular-architects/native-federation
Configure the shell application
To configure the application named shell that we created earlier as a shell that can host multiple remotes, run the following command:
ng g @angular-architects/native-federation:init --project shell --port 4200 --type dynamic-host
- The above command directs the angular cli to host the shell application at port 4200 when running the local server.
- It also specifies the type of application as dynamic-host which the mostly used configuration type for shell for enterprise applications.
Configure the remote application
To configure the application named todo that we created earlier as a remote application run the following command:
ng g @angular-architects/native-federation:init --project todo --port 4201 --type remote
- The above command directs angular cli to host the todo application as a remote application , and when runnning on local server it will be hosted at port 4201.
Now, we need to update the remote entry port to 4201 in federation.manifest.json file which is present inside the public folder in the shell application’s folder. The federation.manifest.json is used by the shell application to refer the urls of the remote applications. Please refer the below image for reference:

Navigation to the remote application:
Now to open the remote application ‘todo’ inside the shell application we need to configure navigation to the ‘todo’ application.
- For that first create a home component inside the shell application
- Configure the routings of the shell application’s ‘home’ component and the remote application ‘todo’ as follows
import { loadRemoteModule } from '@angular-architects/native-federation';
import { Routes } from '@angular/router';
import { HomeComponent } from './home-component/home-component';
export const routes: Routes = [
{
path: '',
component: HomeComponent
},
{
path: 'todo',
loadComponent: () => loadRemoteModule('todo','./Component').then((m) => m.App )
},
{
path: '**',
component: HomeComponent
},
];
- In the above code ‘loadRemoteModule’ is a method provided by the angular-architects package .
- The 1st argument ‘todo’ in the ‘loadRemoteModule’ method points to the ‘todo’ key in federation.manifest.json file (mentioned in the image above) and loads the remote app mentioned in the url against the ‘todo’ key.
- The 2nd argument ‘./Component’ in the loadRemoteModule method points to the ‘exposes’ object’s ‘./Component’ key in the federation.config.mjs file of the remote app ‘todo’. The value against the ‘./Component’ key is the path to the remote app’s root component file. See the below image reference:

Run the shell and remote on localhost
Now , as all the configuration are complete. Enter the following command at the workspace level to run the shell application :
ng s shell
After the above command gets executed you will see the shell application running at port 4200

Similarly, enter the following command at the workspace level to run the remote app todo :
ng s todo
After the above command gets executed you will see the remote app todo running at port 4201:

The output on browser
On running localhost:4200 user will land at the home component present inside the shell :

On clicking the ‘todo’ link the ‘todo’ remote app will be loaded inside the shell app :

Remote app gets lazily loaded:
Note that the remote app build file gets loaded in the browser only when the user clicks on the todo link :

Summary
In this practical guide, we explored how to implement Native Federation in Angular to build a micro-frontend architecture. We created a shell application and a remote application, configured Native Federation for both applications, and integrated the remote application into the shell using Angular routing.
We also demonstrated how the remote application is lazily loaded when the user navigates to it, allowing different parts of an Angular application to be developed and maintained independently.
Native Federation provides a powerful way to modularize large Angular applications, enabling teams to work independently while delivering a unified user experience. This approach can be particularly beneficial for large enterprise applications where scalability, maintainability, and independent deployment are important considerations.