Get Angular version of web page using JavaScript

Use this snippet of JavaScript to determine the exact version of Angular a web page is using.

> window.getAllAngularRootElements()[0].getAttribute('ng-version')
"9.1.12"

Compare with releases listed on project's releases page: https://github.com/angular/angular/releases

View this page on GitHub.
Posted .

Comments

Leave a Reply