diff --git a/aio/content/examples/animations/src/app/app.component.html b/aio/content/examples/animations/src/app/app.component.html index c2d1188f70..1deca03101 100644 --- a/aio/content/examples/animations/src/app/app.component.html +++ b/aio/content/examples/animations/src/app/app.component.html @@ -12,10 +12,12 @@ Toggle All Animations Auto Calculation Filter/Stagger Hero Groups + Insert/Remove +
- \ No newline at end of file + diff --git a/aio/content/examples/animations/src/app/app.module.ts b/aio/content/examples/animations/src/app/app.module.ts index ae5c73f29f..1b3e8969d8 100644 --- a/aio/content/examples/animations/src/app/app.module.ts +++ b/aio/content/examples/animations/src/app/app.module.ts @@ -35,6 +35,7 @@ import { InsertRemoveComponent } from './insert-remove.component'; { path: 'hero-groups', component: HeroListGroupPageComponent }, { path: 'enter-leave', component: HeroListEnterLeavePageComponent }, { path: 'auto', component: HeroListAutoCalcPageComponent }, + { path: 'insert-remove', component: InsertRemoveComponent}, { path: 'home', component: HomeComponent, data: {animation: 'HomePage'} }, { path: 'about', component: AboutComponent, data: {animation: 'AboutPage'} }, diff --git a/aio/content/examples/animations/src/app/insert-remove.component.html b/aio/content/examples/animations/src/app/insert-remove.component.html index f40238dbea..59dd8d7ba0 100644 --- a/aio/content/examples/animations/src/app/insert-remove.component.html +++ b/aio/content/examples/animations/src/app/insert-remove.component.html @@ -1,4 +1,7 @@ + +

Insert/Remove

+ diff --git a/aio/content/examples/animations/src/app/insert-remove.component.ts b/aio/content/examples/animations/src/app/insert-remove.component.ts index 596f8e7168..012b02ad5c 100644 --- a/aio/content/examples/animations/src/app/insert-remove.component.ts +++ b/aio/content/examples/animations/src/app/insert-remove.component.ts @@ -9,10 +9,10 @@ import { trigger, transition, animate, style } from '@angular/animations'; trigger('myInsertRemoveTrigger', [ transition(':enter', [ style({ opacity: 0 }), - animate('5s', style({ opacity: 1 })), + animate('100ms', style({ opacity: 1 })), ]), transition(':leave', [ - animate('5s', style({ opacity: 0 })) + animate('100ms', style({ opacity: 0 })) ]) ]), // #enddocregion enter-leave-trigger diff --git a/aio/content/guide/transition-and-triggers.md b/aio/content/guide/transition-and-triggers.md index 909bb4344d..04108a5c71 100644 --- a/aio/content/guide/transition-and-triggers.md +++ b/aio/content/guide/transition-and-triggers.md @@ -2,7 +2,8 @@ You learned the basics of Angular animations in the [introduction](guide/animations) page. -In this guide, we go into greater depth on special transition states such as `*` (wildcard) and `void`, and show how these special states are used for elements entering and leaving a view. The chapter also explores multiple animation triggers, animation callbacks and sequence-based animation using keyframes. +This guide goes into greater depth on special transition states such as `*` (wildcard) and `void`, and show how these special states are used for elements entering and leaving a view. +This chapter also explores multiple animation triggers, animation callbacks, and sequence-based animation using keyframes. ## Predefined states and wildcard matching @@ -18,7 +19,8 @@ For example, a transition of `open => *` applies when the element's state change wildcard state expressions -Here's another code sample using the wildcard state together with our previous example using the `open` and `closed` states. Instead of defining each state-to-state transition pair, we're now saying that any transition to `closed` takes 1 second, and any transition to `open` takes 0.5 seconds. +The following is another code sample using the wildcard state together with the previous example using the `open` and `closed` states. +Instead of defining each state-to-state transition pair, any transition to `closed` takes 1 second, and any transition to `open` takes 0.5 seconds. This allows us to add new states without having to include separate transitions for each one. @@ -30,7 +32,9 @@ Use a double arrow syntax to specify state-to-state transitions in both directio ### Using wildcard state with multiple transition states -In our two-state button example, the wildcard isn't that useful because there are only two possible states, `open` and `closed`. Wildcard states are better when an element in one particular state has multiple potential states that it can change to. If our button can change from `open` to either `closed` or something like `inProgress`, using a wildcard state could reduce the amount of coding needed. +In the two-state button example, the wildcard isn't that useful because there are only two possible states, `open` and `closed`. +Wildcard states are better when an element in one particular state has multiple potential states that it can change to. +If the button can change from `open` to either `closed` or something like `inProgress`, using a wildcard state could reduce the amount of coding needed.