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
.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
// | |
// 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
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
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
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
describe('App', function() { | |
beforeEach(module('myApp')); | |
describe('itemHistory factory', function() { | |
it('should have working push and list functions', inject(function(itemHistory) { | |
itemHistory.push({ id : 1, title:'yes' }); | |
expect(itemHistory.list()).toEqual([{ id :1, title:'yes'}]); |
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
myModule.animation('.slide', function($animateStagger) { | |
return { | |
enter : function(element, done) { | |
return $animateStagger(element, function(index) { | |
}); | |
} | |
} | |
}); |
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
<script type="text/ng-template" id="form-template"> | |
<div ng-messages> | |
<div ng-message="invalid">You entered an invalid value for this field</div> | |
<div ng-message="required">This value is required</div> | |
<div ng-message="minlength">Your value is too short</div> | |
</div> | |
</script> | |
<form> | |
<input name="myEmailInput" /> |
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
. | |
├── Gruntfile.js | |
├── README.md | |
├── app | |
│ ├── assets | |
│ │ ├── app.css | |
│ │ └── app.js | |
│ ├── font | |
│ │ ├── FontAwesome.otf | |
│ │ ├── font |