Skip to content

Latest commit

 

History

History
79 lines (57 loc) · 4.42 KB

File metadata and controls

79 lines (57 loc) · 4.42 KB
title AngularJS to React/Angular
description Upgrade AngularJS 1.x SPAs to React 18 or Angular 17 with TypeScript
authors
marconsilva
category Code Modernization
industry Cross-Industry
services
Azure Static Web Apps
Azure Functions
languages
JavaScript
TypeScript
frameworks
React
Angular
Vite
modernizationTools
agenticTools
tags
angularjs-migration
spa-modernization
typescript
state-management
extensions
github.copilot
thumbnail https://raw.githubusercontent.com/EmeaAppGbb/appmodlab-angularjs-to-react-angular-modern/main/assets/thumbnail-gpt-image.png
video
version 1.0.0

Overview

This lab walks you through modernizing a legacy AngularJS 1.x single-page application into a fully typed, component-driven app built with either React 18 or Angular 17 and TypeScript. You will migrate routing, state management, API integration, and UI components while preserving existing functionality — ultimately producing a maintainable, testable codebase ready for production deployment on Azure Static Web Apps.

The Legacy Application

The starting point is GlobalTravel Corp — Corporate Travel Portal, a full-featured AngularJS 1.6.x SPA that manages corporate travel workflows. It relies on UI-Router for navigation, Restangular for REST API calls, Bootstrap 3 for styling, and a Bower/Grunt toolchain — all patterns that have since been superseded by modern frameworks and bundlers.

Application Entry Point

Users are greeted by a simple login screen before being routed to the main dashboard, which serves as the hub for every travel module.

Login Page The login screen uses mock authentication, storing a JWT in localStorage to gate access to the portal.

Dashboard The dashboard links to all five modules — Flights, Hotels, Itinerary, Travel Requests, and Expenses — each implemented as a separate UI-Router state.

Key Modules

The portal includes several data-rich modules with forms, filters, and API-driven result lists that must be faithfully recreated during the migration.

Flight Search The flight search module features round-trip/one-way toggling, date pickers, cabin class selection, and dynamic search results — showcasing the complexity that must carry over to the modern stack.

Hotel Booking Hotel booking combines destination search, date ranges, and guest/room selectors with card-based results, illustrating the rich interactive UI the legacy app provides.


Initial Application Screenshots

The following screenshots capture the original AngularJS 1.6.x application ("GlobalTravel Corp — Corporate Travel Portal") before modernization. The app uses UI-Router for navigation, Restangular for API calls, Bootstrap 3 for styling, and Bower/Grunt for build tooling.

Login Page

Login Page Simple mock login screen with an "Enter Portal" button. No form validation — authentication stores a JWT in localStorage.

Dashboard

Dashboard Main portal hub with links to all five modules: Flights, Hotels, Itinerary, Travel Requests, and Expenses.

Flight Search

Flight Search Round-trip / one-way toggle, origin/destination inputs, date pickers, cabin class selector, and passenger count. Search results populate below the form.

Hotel Booking

Hotel Booking Destination city, check-in/check-out dates, guest and room selectors with a search button. Results display hotel cards with ratings and amenities.

Itinerary

Itinerary List/Timeline/Print view toggle for managing booked trips. Shows a loading spinner while fetching itinerary data from the API.

Travel Requests

Travel Requests Filterable list (All/Pending/Approved/Rejected) with search. Includes a "New Request" button and a "Create Your First Request" empty-state prompt. Shows API error handling when the backend is unreachable.

Expense Reconciliation

Expense Reconciliation Status filter tabs (All/Draft/Pending/Approved/Rejected), search bar, date range filter, and a "New Report" button. Displays a loading state while fetching expense reports.