Skip to content

Instantly share code, notes, and snippets.

View matsko's full-sized avatar

Matias Niemelä matsko

View GitHub Profile
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;
},
class MyAnimation extends LoopedAnimation {
const DURATION = 1000;
final dom.Element element;
final AnimationLoop animationLoop;
MyAnimation(this.element, this.animationLoop) {
animationLoop.play(this);
}
value == true
? 'a'
: 'b';
value == true ?
'a' :
'b';
value == true ? 'a' : 'b';
body[ng-cloak] {
position:relative;
}
body[ng-cloak]:after {
content:"";
position:absolute;
top:0;
left:0;
right:0;
<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>
<div ng-messages-template>
<div ng-message-on="abc">123</div>
</div>
iit('should continue the phase', inject(function($rootScope) {
$rootScope.$watch('a', function(a) {
if (a === 1) throw new minErr('$compile')('fail', '...');
});
$rootScope.a = 0;
$rootScope.$digest();
expect(function() {
$rootScope.a = 1;
function append(prop, promise) {
return function(book) {
promise.then(function(data) {
book[prop] = data;
})
}
};
var requests = [];
var book = bookQuery(isbnQuery(code))
* ngModule.animation('.my-inline-animation', function() {
* return {
* animate : function(element, from, to, done) {
* //styles
* }
* }
* });
$animate.enter(element, parent, null, {
from : {
opacity: 0
},
to : {
opacity: 1
}
});