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:
Matias Niemelä
2016-07-07 12:13:52 -07:00
parent f1fc1dc669
commit 7f4954bed6
7 changed files with 79 additions and 36 deletions

View File

@ -35,7 +35,7 @@ import {Component, animate, state, style, transition, trigger} from '@angular/co
<button (click)="expand()">Open</button>
<button (click)="collapse()">Closed</button>
<hr />
<div class="toggle-container" @openClose="stateExpression">
<div class="toggle-container" [@openClose]="stateExpression">
Look at this box
</div>
`