How can I check my version of Angular I’m using?

How can I check my version of Angular I’m using?

Asked on October 16, 2018 in AngularJs.
Add Comment


  • 5 Answer(s)

    Angular does not have a command line tool.

    To  get the version number from the JavaScript file itself.

    Header of the current  Angular Js:

    /**
    * @license AngularJS v1.0.6
    * (c) 2010-2012 Google, Inc. http://angularjs.org
    * License: MIT
    */
    

     

    Answered on October 16, 2018.
    Add Comment

    Use this in  command prompt to check the version:

    ng -v
    
    Answered on December 16, 2018.
    Add Comment
    angular.version.full

    it will give you the full version, e.g. (depending on your current version). [It actually gets the fullproperty of angular.version object.]

    "1.4.3"

    So, to see the full object, if you type

    angular.version

    It will give you the full version object containing version information like full, major, minor and also the codeName, e.g.

    Object {full: "1.4.3", major: 1, minor: 4, dot: 3, codeName: "foam-acceleration"}
    Answered on January 18, 2019.
    Add Comment

    There are several ways you can do that:

    Go into node_modules/@angular/core/package.json and check version field.
    If you need to use it in your code, you can import it from the @angular/core:

    import { VERSION } from ‘@angular/core’;

    Inspect the rendered DOM – Angular adds the version to the main component element:

    Answered on February 5, 2019.
    Add Comment

    There are several ways you can do that:

    1. Go into node_modules/@angular/core/package.json and check version field.
    2. If you need to use it in your code, you can import it from the @angular/core:

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

    3. Inspect the rendered DOM – Angular adds the version to the main component element:

      <my-app ng-version="4.1.3">

    Answered on February 9, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.