fix(renderer): apply host element encapsulation also if the parent component is not encapsulated.
Closes #5240
This commit is contained in:
@@ -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>');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user