diff options
| author | pliablepixels <pliablepixels@gmail.com> | 2016-04-17 14:50:26 -0400 |
|---|---|---|
| committer | pliablepixels <pliablepixels@gmail.com> | 2016-04-17 14:50:26 -0400 |
| commit | fb86cb075d5a075ce273588693fba57e4338b349 (patch) | |
| tree | c2b37ca28982aba8f689b6da088c2328f5c93bd2 /www/lib/ionic-native-transitions/test/config.js | |
| parent | 9b96991f06a11513b524e45d06dab0ebbbd26ea7 (diff) | |
#226 - kung-fu native transitions
Former-commit-id: 78e74ddfc0db6458a7dfd1af0fb5ca9acf3abacd
Diffstat (limited to 'www/lib/ionic-native-transitions/test/config.js')
| -rw-r--r-- | www/lib/ionic-native-transitions/test/config.js | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/www/lib/ionic-native-transitions/test/config.js b/www/lib/ionic-native-transitions/test/config.js new file mode 100644 index 00000000..2aa38109 --- /dev/null +++ b/www/lib/ionic-native-transitions/test/config.js @@ -0,0 +1,119 @@ +export default function($ionicNativeTransitionsProvider, $stateProvider, $urlRouterProvider, $ionicConfigProvider) { + 'ngInject'; + $ionicNativeTransitionsProvider.setDefaultOptions({ + duration: 500, + // backInOppositeDirection: true + }); + + $ionicNativeTransitionsProvider.setDefaultTransition({ + type: 'flip', + direction: 'left' + }); + + $ionicNativeTransitionsProvider.setDefaultBackTransition({ + type: 'slide', + direction: 'right' + }); + + $ionicNativeTransitionsProvider.enable(false); + + $ionicConfigProvider.tabs.position('top'); + + $stateProvider + .state('tabs', { + url: "/tab", + abstract: true, + templateUrl: "templates/tabs.html" + }) + .state('tabs.home', { + url: "/home", + nativeTransitions: null, + views: { + 'home-tab': { + templateUrl: "templates/home.html" + } + } + }) + .state('one', { + url: "/one", + nativeTransitions: { + "type": "flip", + "direction": "up" + }, + nativeTransitionsAndroid: { + "type": "flip", + "direction": "right" + }, + nativeTransitionsBackAndroid: { + "type": "flip", + "direction": "left" + }, + nativeTransitionsIOS: { + "type": "flip", + "direction": "left" + }, + nativeTransitionsWindowsPhone: { + "type": "flip", + "direction": "down" + }, + templateUrl: "templates/one.html" + }) + .state('two', { + url: "/two", + nativeTransitions: { + type: "fade" + }, + nativeTransitionsIOS: { + "type": "flip", + "direction": "down" // 'left|right|up|down', default 'right' (Android currently only supports left and right) + }, + templateUrl: "templates/two.html" + }) + .state('three', { + url: "/three", + nativeTransitions: { + type: "fade" + }, + nativeTransitionsAndroid: { + "type": "slide", + "direction": "up" // 'left|right|up|down', default 'right' (Android currently only supports left and right) + }, + nativeTransitionsBackAndroid: { + "type": "slide", + "direction": "down" // 'left|right|up|down', default 'right' (Android currently only supports left and right) + }, + templateUrl: "templates/three.html" + }) + .state('four', { + url: "/four?testParamUrl", + params: { + test: null + }, + templateUrl: "templates/four.html", + controller: function($stateParams){ + 'ngInject'; + console.log('$stateParams', $stateParams); + } + }) + .state('tabs.about', { + url: "/about", + nativeTransitions: null, + views: { + 'about-tab': { + templateUrl: "templates/about.html" + } + } + }) + .state('tabs.contact', { + url: "/contact", + nativeTransitions: null, + views: { + 'contact-tab': { + templateUrl: "templates/contact.html" + } + } + }); + + + $urlRouterProvider.otherwise("/tab/home"); +} |
