ItSolutionStuff.com

How to Update Angular 17 to Angular 18 Version?

By Hardik Savani • May 27, 2024
Angular

In this post, I will show you how to upgrade angular 17 to angular 18 version in ubuntu.

While working on my Angular project, I encountered the need to migrate from Angular 17 to Angular 18. Attempting to execute a straightforward update command proved unsuccessful, indicating that certain configurations were impacted. This prompted me to consider alternative methods for upgrading Angular.

There are two approaches to facilitate the transition from Angular 17 to 18. Initially, we'll attempt a direct update of the Angular CLI version. If this proves ineffective, an alternative solution involves uninstalling and reinstalling the Angular CLI, following the provided steps.

Following Way to Upgrade Angular 17 to 18 Version

  • Way 1: Update Angular CLI
  • Way 2: Update Angular CLI using reinstall

Let's see both ways:

Way 1: Update Angular CLI

You can directly upgrade your angular CLI version globally by using the update command of ng. so you can do it by bellow command.

ng update @angular/cli @angular/core

Now you can see ng version by following command:

ng version

Way 2: Update Angular CLI using reinstall

I will show you list of commands for update version angular 17 to angular 18 by using uninstall and upgrade angular version.

Uninstall Angular CLI:

npm uninstall -g @angular/cli

Clear Cache:

npm cache clean --force
  
npm cache verify

Install Angular CLI:

npm install -g @angular/cli

Now you have a new version of angular CLI. so you can check it by following the command:

ng version

You will see a layout bellow:

I hope it can help you...

Hardik Savani

Hardik Savani

I'm a full-stack developer, entrepreneur, and founder of ItSolutionStuff.com. Passionate about PHP, Laravel, JavaScript, and helping developers grow.

📺 Subscribe on YouTube

We Are Recommending You

Angular 17 Get the Current Route Example

Read Now →

How to Install Specific Version of Angular Material?

Read Now →

Angular Material Checkbox Change Size Example

Read Now →

Angular Get Current Date and Time Example

Read Now →

Angular Material Select Dropdown with Search Example

Read Now →

Angular Material Mat Table Vertical Scroll Example

Read Now →

Angular Material Table Example| Angular Mat Table Example

Read Now →

Angular Material Dynamic Checkbox List Example

Read Now →

Angular Material Carousel Slider Example

Read Now →

Angular Bar Chart Example Tutorial

Read Now →

Angular Material Input Autocomplete Off Example

Read Now →

Angular Material Input Currency Mask Example

Read Now →

Angular Ng-Content Example Tutorial

Read Now →