1
角度1.xでは、実行時に angular.version
を使用して現在のバージョンを判断できます。現在の角度2.xのバージョンを確認する
アンギュラ2.xに類似したものはありますか? ng
、ng.core
、ng.common
、ng.compiler
のオブジェクトを検索しました。
角度1.xでは、実行時に angular.version
を使用して現在のバージョンを判断できます。現在の角度2.xのバージョンを確認する
アンギュラ2.xに類似したものはありますか? ng
、ng.core
、ng.common
、ng.compiler
のオブジェクトを検索しました。
角度2.3.0-rc0以上に含まれるthis commitからは@angular/core
のVERSION
のconstを使用できます。
import { Component, VERSION } from '@angular/core';
@Component({
selector: 'angular-version',
template: '<p>Version: {{version}}</p>'
})
export class VersionComponent {
version: string = VERSION.full;
}
あなただけの、開発ツールでバージョンを取得
document.querySelector('[ng-version]').getAttribute('ng-version')
ような何かをしようとか、app-root
要素を検査する必要がある場合。
おそらく '@ angular/upgrade'モジュールを見ているかもしれません。このようなものがあるかもしれません。 – martin
Thx @Martin、しかし、それは不幸にもそうではありませんでした。 – MEMark