Skip to content

Instantly share code, notes, and snippets.

View matsko's full-sized avatar

Matias Niemelä matsko

View GitHub Profile
<div ng-message="form['email'].errorStates" ng-message-include="tpl" ng-message-multiple="true">
<div ng-message-on="ng-maxlength">{{ $control.elementAt(0).viewValue }} is too long</div>
</div>
body[ng-cloak] {
position:relative;
}
body[ng-cloak]:after {
content:"";
position:absolute;
top:0;
left:0;
right:0;
value == true
? 'a'
: 'b';
value == true ?
'a' :
'b';
value == true ? 'a' : 'b';
class MyAnimation extends LoopedAnimation {
const DURATION = 1000;
final dom.Element element;
final AnimationLoop animationLoop;
MyAnimation(this.element, this.animationLoop) {
animationLoop.play(this);
}
hasClass : function(className, sequenceID) {
sequenceID = sequenceID || index.length;
var count = hasClass(element, className) ? 1 : 0;
for(var i = 0; i <= sequenceID; i++) {
var lookup = index[i];
count += lookup[className] ? lookup[className] : 0;
}
return count > 0;
},
var classNameFilter = $animateProvider.classNameFilter();
var isAnimatableClassName = !classNameFilter ?
function() { return true; } :
function(className) {
return classNameFilter.test(className);
}
var isAnimatableClassName = function() { return true; };
var classNameFilter = $animateProvider.classNameFilter();
if(classNameFilter) {
isAnimatableClassName = function(className) {
return classNameFilter.test(className);
}
}
one: function(element, type, fn) {
element = jqLite(element);
element.on(type, fn);
element.on(type, function onFn() {
element.off(type, onFn);
element.off(type, fn);
});
},
element.on('$animate:start', onAnimateStart);
element.on('$animate:close', onAnimateClose);
function onAnimateStart(data) {
element.off('$animate:start', onAnimateStart);
//do stuff
}
function onAnimateClose(data) {
element.off('$animate:close', onAnimateClose);
.
├── Gruntfile.js
├── README.md
├── app
│   ├── assets
│   │   ├── app.css
│   │   └── app.js
│   ├── font
│   │   ├── FontAwesome.otf
│   │   ├── font