|
43 | 43 | * the element is removed from the DOM tree (HTML).
|
44 | 44 | *
|
45 | 45 | * @example
|
46 |
| - <doc:example> |
47 |
| - <doc:source> |
48 |
| - Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /><br/> |
49 |
| - Show when checked: <span ng-if="checked">I'm removed when the checkbox is unchecked</span> |
50 |
| - </doc:source> |
51 |
| - </doc:example> |
| 46 | + <example animations="true"> |
| 47 | + <file name="index.html"> |
| 48 | + Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /><br/> |
| 49 | + Show when checked: |
| 50 | + <span ng-if="checked" ng-animate="'example'"> |
| 51 | + I'm removed when the checkbox is unchecked. |
| 52 | + </span> |
| 53 | + </file> |
| 54 | + <file name="animations.css"> |
| 55 | + .example-leave-setup, .example-enter-setup { |
| 56 | + -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; |
| 57 | + -moz-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; |
| 58 | + -ms-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; |
| 59 | + -o-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; |
| 60 | + transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s; |
| 61 | + } |
| 62 | +
|
| 63 | + .example-enter-setup { |
| 64 | + opacity:0; |
| 65 | + } |
| 66 | + .example-enter-setup.example-enter-start { |
| 67 | + opacity:1; |
| 68 | + } |
| 69 | +
|
| 70 | + .example-leave-setup { |
| 71 | + opacity:1; |
| 72 | + } |
| 73 | + .example-leave-setup.example-leave-start { |
| 74 | + opacity:0; |
| 75 | + } |
| 76 | + </file> |
| 77 | + </example> |
52 | 78 | */
|
53 | 79 | var ngIfDirective = ['$animator', function($animator) {
|
54 | 80 | return {
|
|
0 commit comments