Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Low-Code vs No-Code Platforms for Node.js: What CTOs Must Know Before Investing

      September 12, 2025

      ServiceNow unveils Zurich AI platform

      September 12, 2025

      Integrating CSS Cascade Layers To An Existing Project

      September 11, 2025

      How React.js AI Code Generation Accelerates Digital Transformation Initiatives

      September 11, 2025

      GitHub Availability Report: August 2025

      September 11, 2025

      GitHub Copilot coding agent 101: Getting started with agentic workflows on GitHub

      September 11, 2025

      Compiling Multiple CSS Files into One

      September 11, 2025

      When Cells Collide: The Making of an Organic Particle Experiment with Rapier & Three.js

      September 11, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      PHP 8.5.0 Beta 3 available for testing

      September 12, 2025
      Recent

      PHP 8.5.0 Beta 3 available for testing

      September 12, 2025

      Stock Prediction using Python machine Learning (ML)

      September 12, 2025

      How to Successfully Upgrade Angular 16 to 17: Handling Legacy Angular Material Components

      September 12, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Pironman 5 Max Review: Best Raspberry Pi Case Money can Buy

      September 12, 2025
      Recent

      Pironman 5 Max Review: Best Raspberry Pi Case Money can Buy

      September 12, 2025

      Distribution Release: Voyager Live 13

      September 11, 2025

      FOSS Weekly #25.37: Mint 22.2 Released, Official KDE Distro, Kazeta Linux for 90s Gaming, Ubuntu 25.10’s New Terminal and More Linux Stuff

      September 11, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»How to Successfully Upgrade Angular 16 to 17: Handling Legacy Angular Material Components

    How to Successfully Upgrade Angular 16 to 17: Handling Legacy Angular Material Components

    September 12, 2025

    Upgrading Angular Applications: Angular 16 to Angular 17

    Upgrading Angular applications to the latest version can sometimes be straightforward, but certain dependencies and legacy code can introduce challenges. In this blog, I’ll share my experience upgrading an Angular 16 project to Angular 17, focusing especially on the migration of Angular Material legacy components.

    Prerequisites for Angular 17 Upgrade

    Before starting the upgrade, ensure your environment meets the following requirements as per the official Angular update guide (angular.dev/update-guide):

    • Node.js: Angular 17 supports Node.js version 18.13.0 or newer.
    • TypeScript: Angular 17 requires TypeScript 5.2 or later.
    • Zone.js: Angular 17 supports Zone.js version 0.14.x or later.

    Make sure to update these dependencies before proceeding.

    Step 1: Upgrade Angular Core and CLI

    Run the following command to update Angular core and CLI to version 17:

    ng update @angular/core@17 @angular/cli@17

    This step should complete successfully without issues.

    Step 2: Upgrade Angular Material and Handle Legacy Components

    When upgrading Angular Material, you might encounter this error:

    Cannot update to Angular Material v17 because the project is using the legacy Material components that have been deleted. While Angular Material v16 is compatible with Angular v17, it is recommended to switch away from the legacy components as soon as possible because they no longer receive bug fixes, accessibility improvements, and new features.

    Read more about migrating away from legacy components: Migrating to MDC-based Angular Material Components

    This happens because Angular Material v17 removes support for legacy components. To migrate, you need to run the MDC migration schematic:

    ng generate @angular/material:mdc-migration

    Common Issue: Partial Migration

    In some cases, running the migration command only updates a single file (e.g., src/_common.scss) and leaves the rest of the legacy components unchanged.

    How to Fix Partial Migration Issue

    To ensure a complete migration, follow these steps:

    1. Create a new Git branch to start the upgrade process fresh.
    2. Run the MDC migration command before upgrading Angular Material:
      ng generate @angular/material:mdc-migration
    3. The migration tool will prompt you with options:
      Limit the migration to a specific directory? (Enter the relative path such as src/app/shared or leave blank for all directories) Leave blank to migrate the entire project.
    4. Then it will ask which components you want to migrate:
      What components do you want to migrate? Button, Card, Checkbox, Chips, Dialog, Form Field, Input, Select, Autocomplete, List, Menu, Paginator, Progress Bar, Progress Spinner, Radio, Slide Toggle, Slider, Snack Bar, Table, Tabs, Tooltip
      Select all components or the ones relevant to your project.
    5. The migration will then run and update all legacy components across your project.

    Step 3: Proceed with Angular Material Upgrade

    After completing the migration, you can now safely upgrade Angular Material:

    ng update @angular/material@17

    This time, the update should complete successfully without errors.

    Summary

    • Verify Node.js, TypeScript, and Zone.js versions before upgrading.
    • Upgrade Angular core and CLI first.
    • Run the MDC migration schematic before upgrading Angular Material to avoid legacy component errors.
    • If migration only partially updates your project, start fresh on a new branch and run the migration with full prompts.
    • Finally, upgrade Angular Material to version 17.

    Following these steps will help you smoothly upgrade your Angular project from version 16 to 17 while handling legacy Angular Material components effectively.

    Thanks for reading! Feel free to share your experiences or ask questions in the comments.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleWhy Oracle Fusion AI is the Smart Manufacturing Equalizer — and How Perficient Helps You Win
    Next Article Stock Prediction using Python machine Learning (ML)

    Related Posts

    Artificial Intelligence

    Scaling Up Reinforcement Learning for Traffic Smoothing: A 100-AV Highway Deployment

    September 12, 2025
    Repurposing Protein Folding Models for Generation with Latent Diffusion
    Artificial Intelligence

    Repurposing Protein Folding Models for Generation with Latent Diffusion

    September 12, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-25278 – OpenHarmony TCB Race Condition Arbitrary Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)
    Repurposing Protein Folding Models for Generation with Latent Diffusion

    Repurposing Protein Folding Models for Generation with Latent Diffusion

    Artificial Intelligence

    CVE-2025-55300 – Komari WebSocket Origin Bypass Remote Code Execution Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Firefox Patches Multiple Vulnerabilities That Could Lead to Browser Crash

    Security

    Highlights

    CVE-2025-47419 – Crestron Automate VX Insecure Communication Vulnerability

    May 6, 2025

    CVE ID : CVE-2025-47419

    Published : May 6, 2025, 9:16 p.m. | 2 hours, 41 minutes ago

    Description : Cleartext Transmission of Sensitive Information vulnerability in Crestron Automate VX allows Sniffing Network Traffic.

    The device allows Web UI and API access over non-secure network ports which exposes sensitive information such as user passwords.

    This issue affects Automate VX: from 5.6.8161.21536 through 6.4.0.49.

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    OpenFeign vs WebClient: How to Choose a REST Client for Your Spring Boot Project

    June 5, 2025

    Distribution Release: Kaisen Linux 3.0

    August 13, 2025

    RTX gaming laptops are on sale ahead of Memorial Day — RTX 4060 deals starting at $649

    May 22, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.