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 ?

1
  • The duplicated question answers how to show the version of the app, this question was about the version of Angular itself. Commented May 18, 2018 at 6:50

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.