fix(core): apply host attributes to root elements (#12761)

Fixes #12744
This commit is contained in:
Tobias Bosch
2016-11-08 15:46:55 -08:00
committed by vikerman
parent a0e9fde653
commit ad3bf6c54f
2 changed files with 17 additions and 1 deletions

View File

@ -358,6 +358,9 @@ export function selectOrCreateRenderHostElement(
var hostElement: any;
if (isPresent(rootSelectorOrNode)) {
hostElement = renderer.selectRootElement(rootSelectorOrNode, debugInfo);
for (var i = 0; i < attrs.length; i += 2) {
renderer.setElementAttribute(hostElement, attrs.get(i), attrs.get(i + 1));
}
} else {
hostElement = createRenderElement(renderer, null, elementName, attrs, debugInfo);
}