fix(ivy): setting up animation properties correctly (FW-643) (#27496)

Prior to this change, animation properties were defined as element attributes, which caused errors at runtime. Now all animation-related attributes are defined as element properties.

Also as a part of this update, we start to account for bindings used in animations, which was previously missing.

PR Close #27496
This commit is contained in:
Andrew Kushnir
2018-12-05 15:56:36 -08:00
committed by Igor Minar
parent 4da739a970
commit c71d7b5633
10 changed files with 59 additions and 34 deletions

View File

@ -140,7 +140,7 @@ describe('compiler compliance: styling', () => {
},
encapsulation: 2,
data: {
animations: [{name: 'foo123'}, {name: 'trigger123'}]
animation: [{name: 'foo123'}, {name: 'trigger123'}]
}
});
`;
@ -182,7 +182,7 @@ describe('compiler compliance: styling', () => {
},
encapsulation: 2,
data: {
animations: []
animation: []
}
});
`;
@ -220,6 +220,8 @@ describe('compiler compliance: styling', () => {
MyComponent.ngComponentDef = $r3$.ɵdefineComponent({
consts: 3,
vars: 1,
template: function MyComponent_Template(rf, $ctx$) {
if (rf & 1) {
$r3$.ɵelement(0, "div", $e0_attrs$);
@ -227,7 +229,7 @@ describe('compiler compliance: styling', () => {
$r3$.ɵelement(2, "div", $e2_attrs$);
}
if (rf & 2) {
$r3$.ɵelementAttribute(0, "@foo", $r3$.ɵbind(ctx.exp));
$r3$.ɵelementProperty(0, "@foo", $r3$.ɵbind(ctx.exp));
}
},
encapsulation: 2