fix: display framework version on bootstrapped component (#13252)
This commit is contained in:
committed by
Alex Rickabaugh
parent
986abbe0b2
commit
16efb13dd1
@@ -12,10 +12,5 @@
|
||||
* Entry point for all public APIs of the core package.
|
||||
*/
|
||||
export * from './src/core';
|
||||
import {Version} from './src/core';
|
||||
/**
|
||||
* @stable
|
||||
*/
|
||||
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
||||
|
||||
// This file only reexports content of the `src` folder. Keep it that way.
|
||||
|
||||
@@ -35,4 +35,4 @@ export * from './core_private_export';
|
||||
export * from './animation/metadata';
|
||||
export {AnimationTransitionEvent} from './animation/animation_transition_event';
|
||||
export {AnimationPlayer} from './animation/animation_player';
|
||||
export {Sanitizer, SecurityContext} from './security';
|
||||
export {Sanitizer, SecurityContext} from './security';
|
||||
|
||||
@@ -13,6 +13,7 @@ import {isPresent, looseIdentical} from '../facade/lang';
|
||||
import {ViewEncapsulation} from '../metadata/view';
|
||||
import {RenderComponentType, RenderDebugInfo, Renderer, RootRenderer} from '../render/api';
|
||||
import {Sanitizer} from '../security';
|
||||
import {VERSION} from '../version';
|
||||
|
||||
import {ExpressionChangedAfterItHasBeenCheckedError} from './errors';
|
||||
import {AppView} from './view';
|
||||
@@ -360,6 +361,7 @@ export function selectOrCreateRenderHostElement(
|
||||
for (let i = 0; i < attrs.length; i += 2) {
|
||||
renderer.setElementAttribute(hostElement, attrs.get(i), attrs.get(i + 1));
|
||||
}
|
||||
renderer.setElementAttribute(hostElement, 'ng-version', VERSION.full);
|
||||
} else {
|
||||
hostElement = createRenderElement(renderer, null, elementName, attrs, debugInfo);
|
||||
}
|
||||
|
||||
@@ -19,4 +19,9 @@ export class Version {
|
||||
get minor(): string { return this.full.split('.')[1]; }
|
||||
|
||||
get patch(): string { return this.full.split('.').slice(2).join('.'); }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @stable
|
||||
*/
|
||||
export const VERSION = new Version('0.0.0-PLACEHOLDER');
|
||||
|
||||
Reference in New Issue
Block a user