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

If you liked this posting, please feel free to leave me a comment below.
View this page on GitHub.
Posted .

Comments

Leave a Reply