Thats my fiddle:
http://jsfiddle.net/7kLde/48/
The rotation of the div is rather a flip... not a smooth rotation.
I use the latest version of
angularjs 1.2 rc3.
Considering the new animate capabilities of the latest angularjs how do I have to integrate
the animation of the rotation?
<div ng-controller="Main">
<button ng-click="rotate()">Toggle</button>
<div style="width:100px;margin:10%;background:red;" ng-class="{true: 'rotate', false: 'rotateCounterwise'}[isActive]">I am rotated!</div>
</div>
var app = angular.module('myApp', []);
function Main($scope) {
$scope.isActive = false;
$scope.rotate = function () {
$scope.isActive = !$scope.isActive;
};
}
.rotate {
-webkit-transform: rotate(90deg);
}
.rotateCounterwise {
-webkit-transform: rotate(0deg);
}