diff options
| author | Matias Niemelä | 2013-07-29 19:45:59 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-07-29 21:22:05 -0700 |
| commit | e1fe2ac2691e319473ed2bbca501fc6b641024e5 (patch) | |
| tree | d6900400222e74403fdc5bed1d5ce4c038bda2f0 /src/ng/directive/ngSwitch.js | |
| parent | 33d45d8fafb5abf99e6fd811cad1dd57daab918b (diff) | |
| download | angular.js-e1fe2ac2691e319473ed2bbca501fc6b641024e5.tar.bz2 | |
chore(ngdocs): all animation-supported directives working with docs examples and jsFiddle/Plunkr pages
Diffstat (limited to 'src/ng/directive/ngSwitch.js')
| -rw-r--r-- | src/ng/directive/ngSwitch.js | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/src/ng/directive/ngSwitch.js b/src/ng/directive/ngSwitch.js index 38a123a2..1ddf90fb 100644 --- a/src/ng/directive/ngSwitch.js +++ b/src/ng/directive/ngSwitch.js @@ -51,8 +51,7 @@ </select> <tt>selection={{selection}}</tt> <hr/> - <div - class="example-animate-container animate-switch" + <div class="animate-switch-container" ng-switch on="selection"> <div ng-switch-when="settings">Settings Div</div> <div ng-switch-when="home">Home Span</div> @@ -67,7 +66,20 @@ } </file> <file name="animations.css"> - .animate-switch > * { + .animate-switch-container { + position:relative; + background:white; + border:1px solid black; + height:40px; + overflow:hidden; + } + + .animate-switch-container > div { + padding:10px; + } + + .animate-switch-container > .ng-enter, + .animate-switch-container > .ng-leave { -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; @@ -80,22 +92,17 @@ bottom:0; } - .example-animate-container > * { - display:block; - padding:10px; - } - - .animate-switch > .ng-enter { + .animate-switch-container > .ng-enter { top:-50px; } - .animate-switch > .ng-enter.ng-enter-active { + .animate-switch-container > .ng-enter.ng-enter-active { top:0; } - .animate-switch > .ng-leave { + .animate-switch-container > .ng-leave { top:0; } - .animate-switch > .ng-leave.ng-leave-active { + .animate-switch-container > .ng-leave.ng-leave-active { top:50px; } </file> |
