I installed angular code on my local computer. I need to know the version of angular that I use in the project. how can i easily find it on cmd command line?
try this command:
ng --version
It prints versions of Angular, Angular CLI, Node, Typescript, etc.
There are several ways to do this:
node_modules/@angular/core/package.json
version
If you need to use it in your code, you can import it from @angular/core:
@angular/core
import { VERSION } from '@angular/core';
Inspect the DOM render - Angular adds a version to the main component element:
<my-app ng-version="4.1.3">
For Angular 1 or 2 (but not for Angular 4+):
, .
angular.version Javascript, .
Angular 4+ , :
/ VS Code.
ng ng --version (. .)v-v
, :
, . :
5. package.json. .
VERSION .
Now you can use the VERSION variable in your code to print the version. For example,
console.log(VERSION.full);
For Angular 2+, you can run this in the console:
document.querySelector('[ng-version]').getAttribute('ng-version')
For AngularJS 1.x:
angular.version.full
You can use ng --version for angular version 7
Source: https://habr.com/ru/post/1679067/More articles:Локальная/UTC дата-время в Date - javascriptskype: how to read chat message with main.db - databaseapplication that simulates a Bluetooth device (printer) - androidI want to display a class attribute (which is a class) with my document - pythonOffice 365 manifest size limit - ms-wordrecipientProviders in jenkins pipe are always empty - jenkinsHow to read from an already open std :: ifstream using a buffer - c ++Android Studio Gradle Project Sync - Could not resolve espresso core and Appomppat [SOLVED] - androidError: (26, 13) Failed to execute: com.android.support:appcompat-v7:25.0.1 - androidWhy does Android Studio convert some primitive Kotlin types as a conditionally safe statement? - javaAll Articles