Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Updated ngAnimate docs #14586

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 13 additions & 41 deletions docs/content/guide/animations.ngdoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,17 @@ Below is a quick example of animations being enabled for `ngShow` and `ngHide`:
</file>
<file name="animations.css">
.sample-show-hide {
padding:10px;
border:1px solid black;
background:white;
padding: 10px;
border: 1px solid black;
background: white;
}

.sample-show-hide {
-webkit-transition:all linear 0.5s;
transition:all linear 0.5s;
transition: all linear 0.5s;
}

.sample-show-hide.ng-hide {
opacity:0;
opacity: 0;
}
</file>
</example>
Expand Down Expand Up @@ -80,11 +79,8 @@ occur when ngRepeat triggers them:
class
*/
.repeated-item.ng-enter, .repeated-item.ng-move {
-webkit-transition:0.5s linear all;
-moz-transition:0.5s linear all;
-o-transition:0.5s linear all;
transition:0.5s linear all;
opacity:0;
transition: all 0.5s linear;
opacity: 0;
}

/*
Expand All @@ -95,7 +91,7 @@ occur when ngRepeat triggers them:
*/
.repeated-item.ng-enter.ng-enter-active,
.repeated-item.ng-move.ng-move-active {
opacity:1;
opacity: 1;
}

/*
Expand All @@ -104,35 +100,14 @@ occur when ngRepeat triggers them:
that has the .repeated-item class
*/
.repeated-item.ng-leave {
-webkit-animation:0.5s my_animation;
-moz-animation:0.5s my_animation;
-o-animation:0.5s my_animation;
animation:0.5s my_animation;
animation: 0.5s my_animation;
}

@keyframes my_animation {
from { opacity:1; }
to { opacity:0; }
}

/*
Unfortunately each browser vendor requires
its own definition of keyframe animation code...
*/
@-webkit-keyframes my_animation {
from { opacity:1; }
to { opacity:0; }
}

@-moz-keyframes my_animation {
from { opacity:1; }
to { opacity:0; }
}

@-o-keyframes my_animation {
from { opacity:1; }
to { opacity:0; }
}
```

The same approach to animation can be used using JavaScript code (**jQuery is used within to perform animations**):
Expand Down Expand Up @@ -217,10 +192,7 @@ The example below shows how to perform animations during class changes:
</file>
<file name="style.css">
.css-class-add, .css-class-remove {
-webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
}

.css-class,
Expand All @@ -231,7 +203,7 @@ The example below shows how to perform animations during class changes:

.css-class-remove.css-class-remove-active {
font-size:1.0em;
color:black;
color: black;
}
</file>
</example>
Expand Down Expand Up @@ -317,8 +289,8 @@ app.config(function($animateProvider) {
```css
/&#42; prefixed with animate- &#42;/
.animate-fade-add.animate-fade-add-active {
transition:1s linear all;
opacity:0;
transition: all 1s linear;
opacity: 0;
}
```

Expand Down