2

i know 'ng --version' to check my angular version on command line. But is there a way to get angular version in code to display it on the website ?

Steffen
  • 21
  • 2
  • The duplicated question answers how to show the version of the app, this question was about the version of Angular itself. – Adrian Fâciu May 18 '18 at 06:50

1 Answers1

1

You can import VERSION and use it where needed:

import { VERSION } from '@angular/core';

This will give you an instance of the Version class with the current values for Angular.

Have a look at the live demo.

Adrian Fâciu
  • 12,414
  • 3
  • 53
  • 68