From f1e2502c71bd7f171a408ccc3cd2e386280f2d7d Mon Sep 17 00:00:00 2001 From: Nate Abele Date: Thu, 16 Jan 2014 02:13:55 -0700 Subject: [PATCH] chore(sample): update animations to Angular 1.2 --- sample/contacts.detail.html | 2 +- sample/contacts.html | 4 ++-- sample/index.html | 7 ++++--- sample/module.js | 2 +- sample/styles.css | 27 ++++++++++++++++++++------- 5 files changed, 28 insertions(+), 14 deletions(-) diff --git a/sample/contacts.detail.html b/sample/contacts.detail.html index 81d0f9b88..2e14942dc 100644 --- a/sample/contacts.detail.html +++ b/sample/contacts.detail.html @@ -9,7 +9,7 @@

{{contact.name}}

{{item.type}} -
+
Click on a contact item to view and/or edit it. diff --git a/sample/contacts.html b/sample/contacts.html index 9bad18a04..c2d1f652c 100644 --- a/sample/contacts.html +++ b/sample/contacts.html @@ -18,10 +18,10 @@ -
+
-
+
diff --git a/sample/index.html b/sample/index.html index 3bbb8ab37..630a1f60f 100644 --- a/sample/index.html +++ b/sample/index.html @@ -10,8 +10,9 @@ - - + + + @@ -50,7 +51,7 @@ -
+

diff --git a/sample/module.js b/sample/module.js index 2f5385e56..06fc3cab6 100644 --- a/sample/module.js +++ b/sample/module.js @@ -1,5 +1,5 @@ // Make sure to include the `ui.router` module as a dependency -angular.module('uiRouterSample', ['ui.router']) +angular.module('uiRouterSample', ['ui.router', 'ngAnimate']) .run( [ '$rootScope', '$state', '$stateParams', function ($rootScope, $state, $stateParams) { diff --git a/sample/styles.css b/sample/styles.css index 4ee6799dd..f07067e77 100644 --- a/sample/styles.css +++ b/sample/styles.css @@ -1,11 +1,24 @@ -.fade-enter-setup, .fade-leave-setup { - transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s; +.slide.ng-leave { + position: relative; } -.fade-enter-setup, -.fade-leave-setup.fade-leave-start { +.slide.ng-enter { + position: absolute; +} +.slide.ng-enter, .slide.ng-leave { + -webkit-transition: -webkit-transform 0.3s ease-in, opacity 0.3s ease-in; + -moz-transition: -moz-transform 0.3s ease-in, opacity 0.3s ease-in; + -o-transition: -o-transform 0.3s ease-in, opacity 0.3s ease-in; + transition: transform 0.3s ease-in, opacity 0.3s ease-in; +} +.slide.ng-enter, .slide.ng-leave.ng-leave-active { + -webkit-transform: scaleX(0.0001); + -o-transform: scaleX(0.0001); + transform: scaleX(0.0001); opacity: 0; } -.fade-leave-setup, -.fade-enter-setup.fade-enter-start { +.slide, .slide.ng-enter.ng-enter-active { + -webkit-transform: scaleX(1); + -o-transform: scaleX(1); + transform: scaleX(1); opacity: 1; -} \ No newline at end of file +}