This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('disableAnimations', ['ngAnimate']).run(['$rootScope','$animate', function($rootScope, $animate) { | |
$animate.enabled(false); | |
$rootScope.$evalAsync(function() { | |
$animate.enabled(false); | |
}); | |
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animationsDisabled(element, parent) { | |
if(element == $rootElement) { | |
return rootAnimateState.disabled || rootAnimateState.running; | |
} | |
var validState; | |
do { | |
//the element did not reach the root element which means that it | |
//is not apart of the DOM. Therefore there is no reason to do | |
//any animations on it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filter(exp) { | |
return function filterHandler(array) { | |
var newArray = []; | |
for(var i=0;i<array.length;i++) { | |
var a = array[i]; | |
if(exp(a)) { | |
newArray.push(a); | |
} | |
} | |
return newArray; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// PROGRAM | |
// | |
function filter(exp) { | |
return function(array) { | |
var newArray = []; | |
for(var i=0;i<array.length;i++) { | |
var a = array[i]; | |
if(exp(a)) { | |
newArray.push(a); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.animate { | |
transition: border 1s, background 2s, color 3s; | |
} | |
element.on('transitionend', callback); | |
function callback(event) { | |
//Chrome, FF, Safari | |
//border | |
//background |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.show-hide.ng-show, | |
.show-hide.ng-hide { | |
transition:0.5s linear all; | |
-webkit-transition:0.5s linear all; | |
-moz-transition:0.5s linear all; | |
-o-transition:0.5s linear all; | |
} | |
.show-hide.ng-show {...} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
//CSS | |
.show-hide.ng-hide-add, | |
.show-hide.ng-hide-remove { | |
transition:0.5s linear all; | |
-webkit-transition:0.5s linear all; | |
-moz-transition:0.5s linear all; | |
-o-transition:0.5s linear all; | |
display:block!important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
animator.animate('ng-hide-add', element).then(function() { | |
addClass('ng-hide'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-animate="{misko:'animation-name'}" ng-class="{misko:$index == 0}"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "hello" |