change transitions when switching ionic view - angle [closed]

0

good community, does anyone know if you can change the style or type of transaction when passing each view? I mean the elements ion-view , and if it is possible that in android show the normal animation and in ios show another different animation, thank you very much.

    
asked by Albert Arias 13.01.2017 в 18:09
source

1 answer

1

NOTE: Please edit your question to explain the part of "Change the animation at the time of changing view" that is not understood correctly, then edit the answer. The other part of the question I answer here:

First, create the different CSS animations according to the platform:

.android .animacion {
   /* aqui los terminos de la animacion para android */
}

.ios .animacion {
   /* aqui los terminos de la animacion para ios */
}

Then, using a controller set in the <body> (it's an example, but it serves any element that is up in the DOM) the class value that corresponds according to the platform.

angular.module('app', ['ionic'])
.controller('bodyCtrl', function($scope) {

  ionic.Platform.ready(function(){
    $scope.isAndroid = ionic.Platform.isAndroid();
    $scope.isIOS     = ionic.Platform.isIOS();
  });

}); 

Being the html:

<body ng-controller="bodyCtrl" ng-class="{android: isAndroid, ios: isIOS }">
  ... <div class="animacion">Este es el elemento animado</div>
</body>
    
answered by 13.01.2017 в 18:43