Arkadiusz Kałkus
Arkadiusz Kałkus

Reputation: 18443

How to check what version of Ember.js is loaded?

How can I check in a browser console what version of Ember.js is loaded? I know I can check it in the library code, on its top

/*!
 * @overview  Ember - JavaScript Application Framework
 * @copyright Copyright 2011-2016 Tilde Inc. and contributors
 *            Portions Copyright 2006-2011 Strobe Inc.
 *            Portions Copyright 2008-2011 Apple Inc. All rights reserved.
 * @license   Licensed under MIT license
 *            See https://raw.github.com/emberjs/ember.js/master/LICENSE
 * @version   2.4.1
 */

like here, but let's say I have two versions and want to check on the fly which one has been loaded. How can I do this in a console?

Upvotes: 8

Views: 14162

Answers (4)

snewcomer
snewcomer

Reputation: 2135

The question also mentions library code, so I thought I would include this here in case somebody gets here and is working with addons.

https://github.com/pzuraq/ember-compatibility-helpers

Example usage here

Upvotes: 0

Daniel B.
Daniel B.

Reputation: 949

In the Browser console You can type

Ember.VERSION

to get the version number of the loaded Ember.js library.

Upvotes: 21

Maarten Parmentier
Maarten Parmentier

Reputation: 21

install the ember-inspector addon and you'll find all the info you need in the 'info' tab.

Upvotes: 2

Arkadiusz Kałkus
Arkadiusz Kałkus

Reputation: 18443

In the source code of the library there's defined version property:

 /**
    The semantic version.

    @property VERSION
    @type String
    @default '2.4.1'
    @static
    @public
  */
  Ember.VERSION = '2.4.1';

To check version of Ember.js in a console simply put

Ember.VERSION

You can see it works on http://emberjs.com/ home page:

> Ember.VERSION
> "2.2.0"

Upvotes: 3

Related Questions