fix(renderer): apply host element encapsulation also if the parent component is not encapsulated.

Closes #5240
This commit is contained in:
Tobias Bosch
2015-11-11 10:21:29 -08:00
parent a3e6406b38
commit 344776f864
2 changed files with 22 additions and 13 deletions
@@ -611,11 +611,11 @@ export function main() {
'innerComp', 'innerid', ViewEncapsulation.Emulated,
[beginElement('div', [], [], false, null), endElement()], []));
var view = createRenderView(
encapsulatedTpl, [beginComponent('my-comp', [], [], null, '0'), endComponent()],
defaultCmpTpl, [beginComponent('my-comp', [], [], null, '0'), endComponent()],
null, nodeFactory);
expect(stringifyFragment(view.fragments[0].nodes))
.toEqual(
'<my-comp _ngcontent-shortid="" _nghost-innerid=""><div _ngcontent-innerid=""></div></my-comp>');
'<my-comp _nghost-innerid=""><div _ngcontent-innerid=""></div></my-comp>');
});
});
});