SlideShare a Scribd company logo
How to Implement Micro Frontend
Architecture using Angular
Framework
Presented by: Unnikrishnan M, Software Engineer
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 2
Micro Frontend Architecture in Angular
The Angular team introduced the concept of workspaces in their 7.0.0 version which was released in Oct, 2018.
With this update, Angular gave developers a new --create-application flag feature during creation of the
application. By default the --create-application flag will be false.
Example:-
ng new <workspaceName> --create-application=<true/false>
With this addition, the developers now have the option to easily create an application, library or workspace.
The following is the Angular CLI command to generate/modify the files based on schematics:-
ng generate <schematic> [options]
This schematic can take one of the following values:
• appShell
• application
• class
• component
• directive
• enum
• guard
• interceptor
• interface
• library
• module
• pipe
• service
• serviceWorker
• webWorker
Workspace Setup-Basic Angular CLI Commands How to
Implement Micro Frontend Architecture using Angular
Framework
We will be looking into the basic commands used for generating:-
1. Application
ng generate application <name> [options]
ng g application <name> [options]
OPTION DESCRIPTION
--inlineStyle=true|false True -> Includes styles inline in the root component.ts file.
Only CSS styles can be included inline.
False -> External styles file is created and referenced in the root
component.ts file.
Default: false
Aliases: -s
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 3
--inlineTemplate=true|false True -> Includes template inline in the root component.ts file.
False ->External template file is created and referenced in the root
component.ts file.
Default: false
Aliases: -t
--lintFix=true|false True -> Applies lint fixes after generating the application.
Default: false
--minimal=true|false True -> Creates a bare-bones project without any testing frameworks.
(Used for learning purposes only.)
Default: false
--prefix=prefix A prefix to apply to generated selectors.
Default: app
Aliases: -p
--routing=true|false True -> Creates a routing NgModule.
Default: false
--skipInstall=true|false Skips installing dependency packages.
Default: false
--skipPackageJson=true|false True -> Does not add dependencies to the "package.json" file.
Default: false
--skipTests=true|false True -> Does not create "spec.ts" test files for the app.
Default: false
Aliases: -S
--style=
css|scss|sass|less|styl
File extension/preprocessor to use for style files.
Default: css
--viewEncapsulation=
Emulated|Native|None|ShadowDom
View encapsulation strategy to use in the new app.
2. Component
ng generate component <name> [options]
ng g component <name> [options]
OPTION DESCRIPTION
--changeDetection=Default|OnPush Change detection strategy to use in the new component.
Default: Default
Aliases: -c
--displayBlock=true|false Specifies if the style will contain :host { display: block; }.
Default: false
Aliases: -b
--export=true|false True -> Declaring NgModule exports this component.
Default: false
--flat=true|false True -> Creates the new files at the top level of the current project.
Default: false
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 4
--inlineStyle=true|false True -> Includes styles inline in the root component.ts file.
Only CSS styles can be included inline.
False -> External styles file is created and referenced in the root
component.ts file.
Default: false
Aliases: -s
--inlineTemplate=true|false True -> Includes template inline in the root component.ts file.
False ->External template file is created and referenced in the root
component.ts file.
Default: false
Aliases: -t
--lintFix=true|false True -> Applies lint fixes after generating the application.
Default: false
--module=module Declaring NgModule.
Aliases: -m
--prefix=prefix Prefix to apply to the generated component selector.
Aliases: -p
--project=project Name of the project.
--selector=selector HTML selector to use for this component.
--skipImport=true|false True -> Does not import this component into the owning NgModule.
Default: false
--skipSelector=true|false True -> Specifies if the component should have a selector.
Default: false
--skipTests=true|false True -> Does not create "spec.ts" test files for the new component.
Default: false
--style=
css|scss|sass|less|styl
File extension or preprocessor to use for style files.
Default: css
--type=type Adds a developer-defined type to the filename, in the format
"name.type.ts".
Default: Component
--viewEncapsulation=
Emulated|Native|None|ShadowDom
View encapsulation strategy to use in the new component.
Aliases: -v
3. Library
ng generate library <name> [options]
ng g library <name> [options]
OPTION DESCRIPTION
--entryFile=entryFile Path in which the library's public API file is created, relative to the workspace
root.
Default: public-api
--lintFix=true|false True -> Applies lint fixes after generating the library.
Default: false
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 5
--prefix=prefix Prefix to apply to generated selectors.
Default: lib
Aliases: -p
--skipInstall=true|false True -> does not install dependency packages.
Default: false
--
skipPackageJson=true|false
True -> Does not add dependencies to the "package.json" file.
Default: false
--skipTsConfig=true|false True -> Does not update "tsconfig.json" to add a path mapping for the new
library. The path mapping is needed to use the library in an app, but can be
disabled here to simplify development.
Default: false
How to Implement Micro Frontend Architecture using Angular
Framework
The basic idea is to create an application that has the following characteristics, incorporating the new feature. The
outline is as follows:-
1. Create a workspace named Next.
2. It has 2 projects named - User Management, Login.
3. It has a library named apiCall which is used across the 2 projects.
Let's start creating it:-
Step 1
Open git bash in the desired folder location.
Type in:-
ng new Next --create-application=false;
Dive inside the Next folder. The created project structure is as follows:-
WORKSPACE
CONFIG FILES PURPOSE
.editorconfig Configuration for code editors.
.gitignore Specifies intentionally untracked files that Git should ignore.
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 6
README.md Introductory documentation for the root app.
angular.json CLI configuration defaults for all projects in the workspace, including configuration options
for build, serve, and test tools that the CLI uses, such as TSLint, Karma, and Protractor.
package.json Configures npm package dependencies that are available to all projects in the workspace.
package-lock.json Provides version information for all packages installed into node_modules by the npm
client.
src/ Source files for the root-level application project.
node_modules/ Npm packages to the entire workspace. Workspace-wide node_modules dependencies are
visible to all projects.
tsconfig.json Default TypeScript configuration for projects in the workspace.
tslint.json Default TSLint configuration for projects in the workspace.
Step 2
Create new project UserManagement.
Type in:-
ng generate application UserManagement
Similarly create an application called Login following the same above commands.
ng generate application Login
The end result will be like:-
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 7
Note - The Login and User Management are two separate Angular Applications. We also have an option to set the
default when the workspace is served. All the features that can be used in Angular projects apply to each of these
projects too. Additional to that, we can also share the styles, assets and services across all the projects inside the
workspace.
APP SUPPORT
FILES PURPOSE
app/ Component files in which your application logic and data are defined.
assets/ Images and other asset files to be copied when you build your application.
environments/ Build configuration options for particular target environments. By default there is an unnamed
standard development environment and a production ("prod") environment. You can define
additional target environment configurations.
favicon.ico Icon used in the bookmark bar.
index.html The main HTML page that is served when someone visits your site. The CLI automatically adds
all JavaScript and CSS files when building your app, so you typically don't need to add any
<script> or<link> tags here manually.
main.ts The main entry point for your application. Compiles the application with the JIT compiler and
bootstraps the application's root module (AppModule) to run in the browser.
polyfills.ts Provides polyfill scripts for browser support.
styles.sass Lists CSS files that supply styles for a project. The extension reflects the style preprocessor you
have configured for the project.
test.ts Main entry point for your unit tests, with some Angular-specific configuration. You don't typically
need to edit this file.
app/src/
Angular components, templates, and styles go here. The app/scr/ folder inside contain your
project's logic and data.
Step 3 –
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 8
Create a library apiCall in the work space.
Type in:-
ng generate library apiCall
It will look like the following in the editor:-
Now the newly created apiCall library can be added as a dependency in both the Login and User Management
applications created earlier. The library can be reused across the workspace.
How to Implement Micro Frontend Architecture using Angular Framework
© RapidValue Solutions Confidential 9
About RapidValue
RapidValue is a global leader in providing digital product engineering solutions including Mobility, Cloud,
Omni-channel, IoT and RPA to enterprises worldwide. RapidValue offers its digital services to the world’s
top brands, Fortune 1000 companies, and innovative emerging start-ups. With offices in the United
States, the United Kingdom, Germany, and India and operations spread across the Middle-East, Europe,
and Canada, RapidValue delivers enterprise service and solutions across various industry verticals.
Disclaimer:
This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used,
circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are
hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful.
© RapidValue Solutions
www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com
+1 877.643.1850 contactus@rapidvaluesolutions.com

More Related Content

What's hot (20)

Mobile operating system
Mobile operating system
Arindam Ganguly
 
PureScript Tutorial 1
PureScript Tutorial 1
Ray Shih
 
AndroidManifest
AndroidManifest
Ahsanul Karim
 
Day 4: Android: UI Widgets
Day 4: Android: UI Widgets
Ahsanul Karim
 
Mobile Programming
Mobile Programming
Mobile Programming LLC
 
Mobile operating system (os)
Mobile operating system (os)
AMIT GUPTA
 
Php sessions & cookies
Php sessions & cookies
baabtra.com - No. 1 supplier of quality freshers
 
Telerik Test studio
Telerik Test studio
Ahamad Sk
 
Spring the Ripper by Evgeny Borisov
Spring the Ripper by Evgeny Borisov
JavaDayUA
 
Qtp Basics
Qtp Basics
mehramit
 
Android Components
Android Components
Aatul Palandurkar
 
Android Training - Content Sharing
Android Training - Content Sharing
Kan-Han (John) Lu
 
20 Hal yang Perlu Dipelajari tentang Perambah dan Web
20 Hal yang Perlu Dipelajari tentang Perambah dan Web
Eko Kurniawan Khannedy
 
Android Services
Android Services
Ahsanul Karim
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Broadcast Receivers in Android
Broadcast Receivers in Android
ma-polimi
 
Automated software testing complete guide
Automated software testing complete guide
TestingXperts
 
Android testing
Android testing
JinaTm
 
Chapter 6 the django admin site
Chapter 6 the django admin site
家璘 卓
 
Introduction to xcode
Introduction to xcode
Sunny Shaikh
 
PureScript Tutorial 1
PureScript Tutorial 1
Ray Shih
 
Day 4: Android: UI Widgets
Day 4: Android: UI Widgets
Ahsanul Karim
 
Mobile operating system (os)
Mobile operating system (os)
AMIT GUPTA
 
Telerik Test studio
Telerik Test studio
Ahamad Sk
 
Spring the Ripper by Evgeny Borisov
Spring the Ripper by Evgeny Borisov
JavaDayUA
 
Qtp Basics
Qtp Basics
mehramit
 
Android Training - Content Sharing
Android Training - Content Sharing
Kan-Han (John) Lu
 
20 Hal yang Perlu Dipelajari tentang Perambah dan Web
20 Hal yang Perlu Dipelajari tentang Perambah dan Web
Eko Kurniawan Khannedy
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Broadcast Receivers in Android
Broadcast Receivers in Android
ma-polimi
 
Automated software testing complete guide
Automated software testing complete guide
TestingXperts
 
Android testing
Android testing
JinaTm
 
Chapter 6 the django admin site
Chapter 6 the django admin site
家璘 卓
 
Introduction to xcode
Introduction to xcode
Sunny Shaikh
 

Similar to How to Implement Micro Frontend Architecture using Angular Framework (20)

Angular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
Himanshu Tamrakar
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
KNOWARTH - Software Development Company
 
Micro frontend
Micro frontend
Amr Abd El Latief
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends way
Prasanna Venkatesan
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
Matt Raible
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
Jonas Bandi
 
"Micro frontends: Unbelievably true life story", Dmytro Pavlov
"Micro frontends: Unbelievably true life story", Dmytro Pavlov
Fwdays
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
Jonas Bandi
 
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
Shem Magnezi
 
Everything You Should Know About the New Angular CLI
Everything You Should Know About the New Angular CLI
Amadou Sall
 
DDC 2024 - Micro Frontends with Blazor (Cologne)
DDC 2024 - Micro Frontends with Blazor (Cologne)
Florian Rappl
 
Front end microservices - October 2019
Front end microservices - October 2019
Mikhail Kuznetcov
 
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
OdessaJS Conf
 
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
azmeelbronii
 
Angular universal
Angular universal
Michael Haberman
 
Micro Frontends
Micro Frontends
Talentica Software
 
"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap...
"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap...
Fwdays
 
Micro frontend: The microservices puzzle extended to frontend
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
Engineering Frontends
Engineering Frontends
Vladimir Milojević
 
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
pyrageisari
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
Himanshu Tamrakar
 
Building applications in a Micro-frontends way
Building applications in a Micro-frontends way
Prasanna Venkatesan
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
Matt Raible
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
Jonas Bandi
 
"Micro frontends: Unbelievably true life story", Dmytro Pavlov
"Micro frontends: Unbelievably true life story", Dmytro Pavlov
Fwdays
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
Jonas Bandi
 
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
Shem Magnezi
 
Everything You Should Know About the New Angular CLI
Everything You Should Know About the New Angular CLI
Amadou Sall
 
DDC 2024 - Micro Frontends with Blazor (Cologne)
DDC 2024 - Micro Frontends with Blazor (Cologne)
Florian Rappl
 
Front end microservices - October 2019
Front end microservices - October 2019
Mikhail Kuznetcov
 
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
'MICROFRONTENDS WITH REACT' by Liliia Karpenko
OdessaJS Conf
 
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
azmeelbronii
 
"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap...
"Micro-frontends from A to Z. How and Why we use Micro-frontends in Namecheap...
Fwdays
 
Micro frontend: The microservices puzzle extended to frontend
Micro frontend: The microservices puzzle extended to frontend
Audrey Neveu
 
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
Building Micro-Frontends: Scaling Teams and Projects Empowering Developers 1s...
pyrageisari
 
Ad

More from RapidValue (20)

How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
RapidValue
 
Play with Jenkins Pipeline
Play with Jenkins Pipeline
RapidValue
 
Accessibility Testing using Axe
Accessibility Testing using Axe
RapidValue
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
RapidValue
 
Automation in Digital Cloud Labs
Automation in Digital Cloud Labs
RapidValue
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
RapidValue
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
RapidValue
 
Appium Automation with Kotlin
Appium Automation with Kotlin
RapidValue
 
Build UI of the Future with React 360
Build UI of the Future with React 360
RapidValue
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORS
RapidValue
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
RapidValue
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
RapidValue
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
RapidValue
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
RapidValue
 
Migration to Extent Report 4
Migration to Extent Report 4
RapidValue
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
RapidValue
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
RapidValue
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
RapidValue
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
RapidValue
 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
RapidValue
 
How to Build a Micro-Application using Single-Spa
How to Build a Micro-Application using Single-Spa
RapidValue
 
Play with Jenkins Pipeline
Play with Jenkins Pipeline
RapidValue
 
Accessibility Testing using Axe
Accessibility Testing using Axe
RapidValue
 
Guide to Generate Extent Report in Kotlin
Guide to Generate Extent Report in Kotlin
RapidValue
 
Automation in Digital Cloud Labs
Automation in Digital Cloud Labs
RapidValue
 
Microservices Architecture - Top Trends & Key Business Benefits
Microservices Architecture - Top Trends & Key Business Benefits
RapidValue
 
Uploading Data Using Oracle Web ADI
Uploading Data Using Oracle Web ADI
RapidValue
 
Appium Automation with Kotlin
Appium Automation with Kotlin
RapidValue
 
Build UI of the Future with React 360
Build UI of the Future with React 360
RapidValue
 
Python Google Cloud Function with CORS
Python Google Cloud Function with CORS
RapidValue
 
Real-time Automation Result in Slack Channel
Real-time Automation Result in Slack Channel
RapidValue
 
Automation Testing with KATALON Cucumber BDD
Automation Testing with KATALON Cucumber BDD
RapidValue
 
Video Recording of Selenium Automation Flows
Video Recording of Selenium Automation Flows
RapidValue
 
JMeter JMX Script Creation via BlazeMeter
JMeter JMX Script Creation via BlazeMeter
RapidValue
 
Migration to Extent Report 4
Migration to Extent Report 4
RapidValue
 
The Definitive Guide to Implementing Shift Left Testing in QA
The Definitive Guide to Implementing Shift Left Testing in QA
RapidValue
 
Data Seeding via Parameterized API Requests
Data Seeding via Parameterized API Requests
RapidValue
 
Test Case Creation in Katalon Studio
Test Case Creation in Katalon Studio
RapidValue
 
How to Perform Memory Leak Test Using Valgrind
How to Perform Memory Leak Test Using Valgrind
RapidValue
 
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
DevOps Continuous Integration & Delivery - A Whitepaper by RapidValue
RapidValue
 
Ad

Recently uploaded (20)

Making significant Software Architecture decisions
Making significant Software Architecture decisions
Bert Jan Schrijver
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
Migrating to Azure Cosmos DB the Right Way
Migrating to Azure Cosmos DB the Right Way
Alexander (Alex) Komyagin
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Software Testing & it’s types (DevOps)
Software Testing & it’s types (DevOps)
S Pranav (Deepu)
 
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Maxim Salnikov
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
AI-Powered Compliance Solutions for Global Regulations | Certivo
AI-Powered Compliance Solutions for Global Regulations | Certivo
certivoai
 
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
usmanch7829
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 
Making significant Software Architecture decisions
Making significant Software Architecture decisions
Bert Jan Schrijver
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
dp-700 exam questions sample docume .pdf
dp-700 exam questions sample docume .pdf
pravkumarbiz
 
Zoneranker’s Digital marketing solutions
Zoneranker’s Digital marketing solutions
reenashriee
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
wAIred_RabobankIgniteSession_12062025.pptx
wAIred_RabobankIgniteSession_12062025.pptx
SimonedeGijt
 
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Looking for a BIRT Report Alternative Here’s Why Helical Insight Stands Out.pdf
Varsha Nayak
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Software Testing & it’s types (DevOps)
Software Testing & it’s types (DevOps)
S Pranav (Deepu)
 
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Agentic Techniques in Retrieval-Augmented Generation with Azure AI Search
Maxim Salnikov
 
Integrating Survey123 and R&H Data Using FME
Integrating Survey123 and R&H Data Using FME
Safe Software
 
AI-Powered Compliance Solutions for Global Regulations | Certivo
AI-Powered Compliance Solutions for Global Regulations | Certivo
certivoai
 
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
IMAGE CLASSIFICATION USING CONVOLUTIONAL NEURAL NETWORK.P.pptx
usmanch7829
 
GDG Douglas - Google AI Agents: Your Next Intern?
GDG Douglas - Google AI Agents: Your Next Intern?
felipeceotto
 
Reimagining Software Development and DevOps with Agentic AI
Reimagining Software Development and DevOps with Agentic AI
Maxim Salnikov
 
Open Source Software Development Methods
Open Source Software Development Methods
VICTOR MAESTRE RAMIREZ
 
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Meet You in the Middle: 1000x Performance for Parquet Queries on PB-Scale Dat...
Alluxio, Inc.
 

How to Implement Micro Frontend Architecture using Angular Framework

  • 1. How to Implement Micro Frontend Architecture using Angular Framework Presented by: Unnikrishnan M, Software Engineer
  • 2. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 2 Micro Frontend Architecture in Angular The Angular team introduced the concept of workspaces in their 7.0.0 version which was released in Oct, 2018. With this update, Angular gave developers a new --create-application flag feature during creation of the application. By default the --create-application flag will be false. Example:- ng new <workspaceName> --create-application=<true/false> With this addition, the developers now have the option to easily create an application, library or workspace. The following is the Angular CLI command to generate/modify the files based on schematics:- ng generate <schematic> [options] This schematic can take one of the following values: • appShell • application • class • component • directive • enum • guard • interceptor • interface • library • module • pipe • service • serviceWorker • webWorker Workspace Setup-Basic Angular CLI Commands How to Implement Micro Frontend Architecture using Angular Framework We will be looking into the basic commands used for generating:- 1. Application ng generate application <name> [options] ng g application <name> [options] OPTION DESCRIPTION --inlineStyle=true|false True -> Includes styles inline in the root component.ts file. Only CSS styles can be included inline. False -> External styles file is created and referenced in the root component.ts file. Default: false Aliases: -s
  • 3. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 3 --inlineTemplate=true|false True -> Includes template inline in the root component.ts file. False ->External template file is created and referenced in the root component.ts file. Default: false Aliases: -t --lintFix=true|false True -> Applies lint fixes after generating the application. Default: false --minimal=true|false True -> Creates a bare-bones project without any testing frameworks. (Used for learning purposes only.) Default: false --prefix=prefix A prefix to apply to generated selectors. Default: app Aliases: -p --routing=true|false True -> Creates a routing NgModule. Default: false --skipInstall=true|false Skips installing dependency packages. Default: false --skipPackageJson=true|false True -> Does not add dependencies to the "package.json" file. Default: false --skipTests=true|false True -> Does not create "spec.ts" test files for the app. Default: false Aliases: -S --style= css|scss|sass|less|styl File extension/preprocessor to use for style files. Default: css --viewEncapsulation= Emulated|Native|None|ShadowDom View encapsulation strategy to use in the new app. 2. Component ng generate component <name> [options] ng g component <name> [options] OPTION DESCRIPTION --changeDetection=Default|OnPush Change detection strategy to use in the new component. Default: Default Aliases: -c --displayBlock=true|false Specifies if the style will contain :host { display: block; }. Default: false Aliases: -b --export=true|false True -> Declaring NgModule exports this component. Default: false --flat=true|false True -> Creates the new files at the top level of the current project. Default: false
  • 4. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 4 --inlineStyle=true|false True -> Includes styles inline in the root component.ts file. Only CSS styles can be included inline. False -> External styles file is created and referenced in the root component.ts file. Default: false Aliases: -s --inlineTemplate=true|false True -> Includes template inline in the root component.ts file. False ->External template file is created and referenced in the root component.ts file. Default: false Aliases: -t --lintFix=true|false True -> Applies lint fixes after generating the application. Default: false --module=module Declaring NgModule. Aliases: -m --prefix=prefix Prefix to apply to the generated component selector. Aliases: -p --project=project Name of the project. --selector=selector HTML selector to use for this component. --skipImport=true|false True -> Does not import this component into the owning NgModule. Default: false --skipSelector=true|false True -> Specifies if the component should have a selector. Default: false --skipTests=true|false True -> Does not create "spec.ts" test files for the new component. Default: false --style= css|scss|sass|less|styl File extension or preprocessor to use for style files. Default: css --type=type Adds a developer-defined type to the filename, in the format "name.type.ts". Default: Component --viewEncapsulation= Emulated|Native|None|ShadowDom View encapsulation strategy to use in the new component. Aliases: -v 3. Library ng generate library <name> [options] ng g library <name> [options] OPTION DESCRIPTION --entryFile=entryFile Path in which the library's public API file is created, relative to the workspace root. Default: public-api --lintFix=true|false True -> Applies lint fixes after generating the library. Default: false
  • 5. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 5 --prefix=prefix Prefix to apply to generated selectors. Default: lib Aliases: -p --skipInstall=true|false True -> does not install dependency packages. Default: false -- skipPackageJson=true|false True -> Does not add dependencies to the "package.json" file. Default: false --skipTsConfig=true|false True -> Does not update "tsconfig.json" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development. Default: false How to Implement Micro Frontend Architecture using Angular Framework The basic idea is to create an application that has the following characteristics, incorporating the new feature. The outline is as follows:- 1. Create a workspace named Next. 2. It has 2 projects named - User Management, Login. 3. It has a library named apiCall which is used across the 2 projects. Let's start creating it:- Step 1 Open git bash in the desired folder location. Type in:- ng new Next --create-application=false; Dive inside the Next folder. The created project structure is as follows:- WORKSPACE CONFIG FILES PURPOSE .editorconfig Configuration for code editors. .gitignore Specifies intentionally untracked files that Git should ignore.
  • 6. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 6 README.md Introductory documentation for the root app. angular.json CLI configuration defaults for all projects in the workspace, including configuration options for build, serve, and test tools that the CLI uses, such as TSLint, Karma, and Protractor. package.json Configures npm package dependencies that are available to all projects in the workspace. package-lock.json Provides version information for all packages installed into node_modules by the npm client. src/ Source files for the root-level application project. node_modules/ Npm packages to the entire workspace. Workspace-wide node_modules dependencies are visible to all projects. tsconfig.json Default TypeScript configuration for projects in the workspace. tslint.json Default TSLint configuration for projects in the workspace. Step 2 Create new project UserManagement. Type in:- ng generate application UserManagement Similarly create an application called Login following the same above commands. ng generate application Login The end result will be like:-
  • 7. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 7 Note - The Login and User Management are two separate Angular Applications. We also have an option to set the default when the workspace is served. All the features that can be used in Angular projects apply to each of these projects too. Additional to that, we can also share the styles, assets and services across all the projects inside the workspace. APP SUPPORT FILES PURPOSE app/ Component files in which your application logic and data are defined. assets/ Images and other asset files to be copied when you build your application. environments/ Build configuration options for particular target environments. By default there is an unnamed standard development environment and a production ("prod") environment. You can define additional target environment configurations. favicon.ico Icon used in the bookmark bar. index.html The main HTML page that is served when someone visits your site. The CLI automatically adds all JavaScript and CSS files when building your app, so you typically don't need to add any <script> or<link> tags here manually. main.ts The main entry point for your application. Compiles the application with the JIT compiler and bootstraps the application's root module (AppModule) to run in the browser. polyfills.ts Provides polyfill scripts for browser support. styles.sass Lists CSS files that supply styles for a project. The extension reflects the style preprocessor you have configured for the project. test.ts Main entry point for your unit tests, with some Angular-specific configuration. You don't typically need to edit this file. app/src/ Angular components, templates, and styles go here. The app/scr/ folder inside contain your project's logic and data. Step 3 –
  • 8. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 8 Create a library apiCall in the work space. Type in:- ng generate library apiCall It will look like the following in the editor:- Now the newly created apiCall library can be added as a dependency in both the Login and User Management applications created earlier. The library can be reused across the workspace.
  • 9. How to Implement Micro Frontend Architecture using Angular Framework © RapidValue Solutions Confidential 9 About RapidValue RapidValue is a global leader in providing digital product engineering solutions including Mobility, Cloud, Omni-channel, IoT and RPA to enterprises worldwide. RapidValue offers its digital services to the world’s top brands, Fortune 1000 companies, and innovative emerging start-ups. With offices in the United States, the United Kingdom, Germany, and India and operations spread across the Middle-East, Europe, and Canada, RapidValue delivers enterprise service and solutions across various industry verticals. Disclaimer: This document contains information that is confidential and proprietary to RapidValue Solutions Inc. No part of it may be used, circulated, quoted, or reproduced for distribution outside RapidValue. If you are not the intended recipient of this report, you are hereby notified that the use, circulation, quoting, or reproducing of this report is strictly prohibited and may be unlawful. © RapidValue Solutions www.rapidvaluesolutions.com/blogwww.rapidvaluesolutions.com +1 877.643.1850 [email protected]