feat(animations): support styling of the default animation state

It is now possible to set a fallback state that will apply its
styling when the destination state is not detected.

```ts
state("*", style({ ... }))
```

Closes #9013
This commit is contained in:
Matias Niemelä
2016-06-03 17:52:33 -07:00
parent c3d2459a4e
commit 36d25f2a07
9 changed files with 121 additions and 11 deletions

View File

@ -1,3 +1,4 @@
export const FILL_STYLE_FLAG = 'true'; // TODO (matsko): change to boolean
export const ANY_STATE = '*';
export const DEFAULT_STATE = '*';
export const EMPTY_STATE = 'void';

View File

@ -292,6 +292,10 @@ export function style(tokens: string|{[key: string]: string | number}|Array<stri
* of the application anymore (e.g. when an `ngIf` evaluates to false then the state of the associated element
* is void).
*
* #### The `*` (default) state
*
* The `*` state (when styled) is a fallback state that will be used if
* the state that is being animated is not declared within the trigger.
*
* ### Usage
*