fixup! feat(ivy): adding support for ngNonBindable attribute

This commit is contained in:
Andrew Kushnir
2018-09-26 15:15:06 -07:00
committed by Alex Rickabaugh
parent d7326d81ba
commit bc1f2d6411
2 changed files with 23 additions and 21 deletions

View File

@ -197,6 +197,29 @@ describe('compiler compliance: bindings', () => {
const result = compile(files, angularFiles);
expectEmit(result.source, template, 'Incorrect handling of local refs for nested elements');
});
it('should not process property bindings and listeners', () => {
const files: MockDirectory = getAppFiles(`
<div ngNonBindable>
<div [id]="my-id" (click)="onclick"></div>
</div>
`);
const template = `
const $_c0$ = ["[id]", "my-id", "(click)", "onclick"];
template:function MyComponent_Template(rf, $ctx$){
if (rf & 1) {
$i0$.ɵelementStart(0, "div");
$i0$.ɵsetBindingsDisabled();
$i0$.ɵelement(1, "div", $_c0$);
$i0$.ɵsetBindingsEnabled();
$i0$.ɵelementEnd();
}
`;
const result = compile(files, angularFiles);
expectEmit(result.source, template, 'Incorrect handling of local refs for nested elements');
});
});
});