fix(ivy): ignore empty bindings (#28059)

This update aligns Ivy behavior with ViewEngine related to empty bindings (for example <div [someProp]></div>): empty bindings are ignored.

PR Close #28059
This commit is contained in:
Andrew Kushnir
2019-01-10 15:54:48 -08:00
parent 9a128a8068
commit 9260b5e0b4
4 changed files with 51 additions and 21 deletions

View File

@ -444,14 +444,13 @@ const TEST_COMPILER_PROVIDERS: Provider[] = [
}));
fixmeIvy('FW-814: Bindings with an empty value should be ignored in the compiler')
.it('should ignore empty bindings', fakeAsync(() => {
const ctx = _bindSimpleProp('[someProp]', TestData);
ctx.componentInstance.a = 'value';
ctx.detectChanges(false);
it('should ignore empty bindings', fakeAsync(() => {
const ctx = _bindSimpleProp('[someProp]', TestData);
ctx.componentInstance.a = 'value';
ctx.detectChanges(false);
expect(renderLog.log).toEqual([]);
}));
expect(renderLog.log).toEqual([]);
}));
it('should support interpolation', fakeAsync(() => {
const ctx = _bindSimpleProp('someProp="B{{a}}A"', TestData);