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
$( "img.userIcon" ).load(function() { | |
if ( $( this ).height() > 100) { | |
$( this ).addClass( "bigImg" ); | |
} | |
}); |
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
git config --global url."https://".insteadOf git:// | |
Reference: https://github.com/bower/bower/issues/50 |
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
// Decodes HTML entities in a browser-friendly way | |
// See http://stackoverflow.com/questions/1912501/\ | |
// unescape-html-entities-in-javascript | |
// convert browser entities like & into a displayed character like &. | |
decodeHtml = function ( str ) { | |
return $('<div/>').html(str || '').text(); | |
}; |
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 instantiate(Type, locals) { | |
var Constructor = function() {}, | |
instance, returnedValue; | |
// Check if Type is annotated and use just the given function at n-1 as parameter | |
// e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]); | |
Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype; | |
instance = new Constructor(); | |
returnedValue = invoke(Type, instance, locals); |
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 invoke(fn, self, locals){ | |
var args = [], | |
$inject = annotate(fn), | |
length, i, | |
key; | |
.... | |
return fn.apply(self, args); |
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 factory(name, factoryFn) { return provider(name, { $get: factoryFn }); } | |
function service(name, constructor) { | |
return factory(name, ['$injector', function($injector) { | |
return $injector.instantiate(constructor); | |
}]); | |
} |
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 () { | |
'use strict'; | |
angular | |
.module('import') | |
.service('DataService', DataService); | |
DataService.$inject = ['$http']; |
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 SomeService () { | |
this.someMethod = function () { | |
}; | |
} | |
angular |
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 AnotherService () { | |
var AnotherService = {}; | |
AnotherService.someValue = ''; | |
AnotherService.someMethod = function () { | |
}; | |
return AnotherService; | |
} |
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
npm -g install weinre |
OlderNewer