fix(animations): change trigger binding syntax to function as a property binding []
Animation triggers can now be set via template bindings `[]` BREAKING CHANGE: animation trigger expressions within the template that are assigned as an element attribute (e.g. `@prop`) are deprecated. Please use the Angular2 property binding syntax (e.g. `[@prop]`) when assigning properties. ```ts // this is now deprecated <div @trigger="expression"></div> // do this instead <div [@trigger]="expression"></div> ```
This commit is contained in:
@ -22,7 +22,7 @@ import {
|
||||
selector: 'animate-app',
|
||||
styleUrls: ['css/animate-app.css'],
|
||||
template: `
|
||||
<div @backgroundAnimation="bgStatus">
|
||||
<div [@backgroundAnimation]="bgStatus">
|
||||
<button (click)="state='start'">Start State</button>
|
||||
<button (click)="state='active'">Active State</button>
|
||||
|
|
||||
@ -30,7 +30,7 @@ import {
|
||||
<button (click)="state='default'">Unhandled (default) State</button>
|
||||
<button style="float:right" (click)="bgStatus='blur'">Blur Page</button>
|
||||
<hr />
|
||||
<div *ngFor="let item of items" class="box" @boxAnimation="state">
|
||||
<div *ngFor="let item of items" class="box" [@boxAnimation]="state">
|
||||
{{ item }}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user