The fastest way to check your Angular version

Open your terminal or command prompt in your project folder and run ng version. This command displays your Angular CLI version, the Angular framework version, Node.js version, and other related tools in one output. If you're working inside an Angular project, this is the most reliable method.

If the ng command doesn't work, you may not have Angular CLI installed globally, or you're not in a project directory. In that case, check the package.json file in your project root — look for the line that starts with "@angular/core" and note the version number listed there.

Key Takeaways

  • Run ng version in your project terminal to see Angular, CLI, and Node versions all at once.
  • If ng version doesn't work, open package.json in your project folder and find the "@angular/core" line to see the framework version.
  • The node_modules/@angular/core/package.json file also contains the exact version if you need to verify what's actually installed.
  • Angular CLI version and Angular framework version are separate — you may have different versions of each.

Using the ng version command

The ng version command works only if you have Angular CLI installed and you're running the command from inside an Angular project directory. Open your terminal, navigate to your project folder, and type the command. The output shows Angular version, Angular CLI version, Node.js version, npm version, and the operating system you're using.

This method is the most complete because it shows you not just Angular's version, but also whether your other tools are compatible. If you see an error like "ng: command not found", Angular CLI is not installed globally on your machine, or your project doesn't have it as a local dependency.

Checking package.json for the version number

Every Angular project has a package.json file in the root directory. Open it with any text editor and search for "@angular/core". The version number appears right after it, usually in a format like "@angular/core": "^17.0.0". The number after the colon is your Angular framework version.

The package.json file lists what your project is supposed to have installed, not necessarily what's actually on your machine. If you want to confirm that the version listed here matches what's really installed, check the node_modules/@angular/core/package.json file instead — that file reflects the actual installed version.

Finding the version in node_modules

Navigate to node_modules/@angular/core/ in your project and open the package.json file there. Look for the "version" field at the top of the file. This shows the exact Angular version that's currently installed on your machine, which may differ from what package.json says if your dependencies haven't been updated recently.

This method is useful when you suspect your installed version doesn't match what your project configuration says it should be. It's also helpful if you're troubleshooting a build error and need to verify that npm or yarn actually installed the correct version.

Understanding Angular CLI version versus framework version

Angular CLI and Angular framework are two separate tools with separate version numbers. The CLI is the command-line tool you use to create and build projects — it's what provides the ng command. The framework is the actual library your application runs on. You can have Angular CLI version 17 but Angular framework version 16 in your project, or vice versa.

When you run ng version, the output clearly labels each one. The line that says "Angular:" is the framework version — that's what matters for your application code. The line that says "Angular CLI:" is the tool version — that's what matters for building and serving your project.

What to do if you see multiple Angular packages

Some projects use multiple Angular packages beyond @angular/core. You might see @angular/common, @angular/platform-browser, @angular/router, and others in your package.json. These should all have the same version number — if they don't, your project may have a dependency conflict that could cause build errors.

If you notice version mismatches across Angular packages, run npm install or yarn install to let the package manager resolve dependencies. This usually updates all Angular packages to compatible versions. If conflicts persist, check your project's documentation or the Angular upgrade guide for your specific version.

Checking version from your application code

Inside your Angular application, you can import and log the version programmatically. Add this to any component or service: import { VERSION } from '@angular/core'; console.log(VERSION.full); This prints the Angular version to your browser console when the application runs.

This method is less common and mainly useful for debugging or displaying version information in your app's UI. For most purposes, checking package.json or running ng version is faster and clearer.

Frequently Asked Questions

Why does ng version show a different version than package.json?

The package.json file describes what versions your project should have, but ng version shows what's actually installed. If you recently changed package.json but haven't run npm install or yarn install, the two will differ. Run your package manager to sync them.

Can I have different Angular versions in different projects?

Yes. Each project folder has its own package.json and node_modules directory, so you can have Angular 16 in one project and Angular 17 in another. The ng version command always shows the version for the project directory you're currently in.

What if ng version doesn't work in my project?

First, make sure you're in the correct project directory. If you're in the right folder and still get "command not found", run npm install to install dependencies, or npm install -g @angular/cli to install Angular CLI globally. Then try ng version again.

Do I need to update Angular if I'm on an old version?

That depends on your project's needs and timeline. Older versions still work, but they don't receive security updates forever. Check the Angular release schedule and your project's requirements before deciding to upgrade.