+
+
Basic State
+
Switch between active/inactive on click.
+
+
+
+
Styles inline in transitions
+
Animated effect on click, no persistend end styles.
+
+
+
+
Combined transition syntax
+
Switch between active/inactive on click. Define just one transition used in both directions.
+
+
+
+
Two-way transition syntax
+
Switch between active/inactive on click. Define just one transition used in both directions using the <=> syntax.
+
+
+
+
Enter & Leave
+
Enter and leave animations using the void state.
+
+
+
+
+
+
Enter & Leave & States
+
Enter and leave animations combined with active/inactive state animations. Different enter and leave transitions depending on state.
+
+
+
+
Auto Style Calc
+
Leave animation from the current computed height using the auto-style value *.
+
+
+
+
Different Timings
+
Enter and leave animations with different easings, ease-in for enter, ease-out for leave.
+
+
+
+
Multiple Keyframes
+
Enter and leave animations with three keyframes in each, to give the transition some bounce.
+
+
+
+
Parallel Groups
+
Enter and leave animations with multiple properties animated in parallel with different timings.
+
+
+
+
+
+ `,
+ styles: [`
+ .buttons {
+ text-align: center;
+ }
+ button {
+ padding: 1.5em 3em;
+ }
+ .columns {
+ display: flex;
+ flex-direction: row;
+ }
+ .column {
+ flex: 1;
+ padding: 10px;
+ }
+ .column p {
+ min-height: 6em;
+ }
+ `],
+ directives: [
+ HeroListBasicComponent,
+ HeroListInlineStylesComponent,
+ HeroListCombinedTransitionsComponent,
+ HeroListTwowayComponent,
+ HeroListEnterLeaveComponent,
+ HeroListEnterLeaveStatesComponent,
+ HeroListAutoComponent,
+ HeroListTimingsComponent,
+ // HeroListClassesComponent,
+ // HeroListKeyframesComponent,
+ HeroListMultistepComponent,
+ HeroListGroupsComponent
+ ],
+ providers: [Heroes]
+})
+export class HeroTeamBuilderComponent {
+ constructor(private heroes:Heroes) { }
+}
diff --git a/public/docs/_examples/animations/ts/app/hero.service.ts b/public/docs/_examples/animations/ts/app/hero.service.ts
new file mode 100644
index 0000000000..6712707848
--- /dev/null
+++ b/public/docs/_examples/animations/ts/app/hero.service.ts
@@ -0,0 +1,54 @@
+import { Injectable } from '@angular/core';
+
+export class Hero {
+ constructor(public name:string,
+ public state = 'inactive') {
+ }
+
+ toggleState() {
+ this.state = (this.state === 'active' ? 'inactive' : 'active');
+ }
+}
+
+@Injectable()
+export class Heroes implements Iterable