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

@ -113,17 +113,6 @@ export abstract class AppView<T> {
}
}
selectOrCreateHostElement(
elementName: string, rootSelectorOrNode: string|any, debugInfo: RenderDebugInfo): any {
var hostElement: any;
if (isPresent(rootSelectorOrNode)) {
hostElement = this.renderer.selectRootElement(rootSelectorOrNode, debugInfo);
} else {
hostElement = this.renderer.createElement(null, elementName, debugInfo);
}
return hostElement;
}
injectorGet(token: any, nodeIndex: number, notFoundResult: any): any {
return this.injectorGetInternal(token, nodeIndex, notFoundResult);
}