refactor(compiler): set element attributes via one call

This makes the cost of using directives that have host attributes
smaller.

Part of #11683
This commit is contained in:
Tobias Bosch
2016-10-19 09:17:36 -07:00
committed by vsavkin
parent bc3f4bc816
commit faa3478514
14 changed files with 269 additions and 87 deletions

View File

@ -33,7 +33,8 @@ class _View_TreeComponent_Host0 extends import1.AppView<any> {
parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector: string): import2.AppElement {
this._el_0 = this.selectOrCreateHostElement('tree', rootSelector, (null as any));
this._el_0 = import4.selectOrCreateRenderHostElement(
this.renderer, 'tree', import4.EMPTY_FAST_ARRAY, rootSelector, (null as any));
this._vc_0 = new import2.AppElement(0, (null as any), this, this._el_0);
this._TreeComponent_0_4 = new _View_TreeComponent0(this._el_0);
this._vc_0.initComponent(this._TreeComponent_0_4.context, [], <any>this._TreeComponent_0_4);

View File

@ -35,7 +35,8 @@ class _View_TreeRootComponent_Host0 extends import1.AppView<any> {
viewUtils, parentInjector, declarationEl, import7.ChangeDetectorStatus.CheckAlways);
}
createInternal(rootSelector: string): import2.AppElement {
this._el_0 = this.selectOrCreateHostElement('tree', rootSelector, (null as any));
this._el_0 = import4.selectOrCreateRenderHostElement(
this.renderer, 'tree', import4.EMPTY_FAST_ARRAY, rootSelector, (null as any));
this._appEl_0 = new import2.AppElement(0, (null as any), this, this._el_0);
var compView_0: any =
viewFactory_TreeRootComponent0(this.viewUtils, this.injector(0), this._appEl_0);