This file contains hidden or 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
/* | |
* Closure example | |
*/ | |
(function () { | |
function addOne() { | |
var num = 0; | |
return function () { | |
return num += 1; | |
}; | |
} |
This file contains hidden or 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("myApp").filter("jsonToHtml", [ | |
function () { | |
return function (json) { | |
var html = "", | |
/** | |
* @param element {Object} - content inside an element | |
* @returns {String} | |
* @private | |
*/ |
This file contains hidden or 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
/* | |
Handy for keyframe animations (spritesheed cycling for example) | |
Usage example: | |
@include keyframe-animation(animation-name, .8s, 5, infinite); | |
@include animation-keys("animation-name") { | |
from { background-position: 0 0; } | |
to { background-position: 0 -200px; } | |
} |