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
/** | |
* This controller is used by youtubeItem directives | |
* @name angulartodo#youtubeItemController | |
* @param {Object} $scope An instance of $scope | |
* @param {Object} $attrs An object containing html attributes bound to this directive | |
*/ | |
angular.module('angulartodo').controller('youtubeItemController',[ | |
'$scope','$attrs', | |
function($scope, $attrs){ | |
console.log("hello world!"); |
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
var InheritableCleanObject = function(){ | |
var publicMembers = this, | |
privateMembers = {}; | |
publicMembers.hello = function(){ | |
return "world"; | |
}; | |
InheritableCleanObject.prototype = publicMembers; | |
} |
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
(function(scope){ //injected scope to bind | |
scope.QLite = {}; | |
var publicMembers = scope.QLite, //bind publicMembers to the injected scope | |
privateMembers = {}; //private members hash for internal closure members | |
privateMembers.promise = function(){ //the promise object | |
var self = this, | |
queue = {}; |
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
var fooList = function(){ | |
var self = this, | |
data = []; | |
self.add = function(name){ | |
data.push(name); | |
}; | |
self.clearDeep = function(){ |
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
/** | |
* iOS 6 style switch checkboxes | |
* by Lea Verou http://lea.verou.me | |
*/ | |
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */ | |
position: absolute; | |
opacity: 0; | |
} |
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('foo').directive('fileUpload', function($event){ | |
return { | |
restrict: 'E', | |
scope: { | |
uploadEvent: '=' | |
}, | |
template: '<input type="file" style="display: inline-block; height: 100%; width: 100%"></input>', | |
link: function(scope, element){ | |
var input = element.find('input'); | |
element.css('display', 'inline'); //make sure the element itself behaves like an input visually so |
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
'use strict'; | |
angular.module('console').factory('Employer', function(DS, $rootScope){ | |
var store = DS.defineResource({ | |
name: 'Employer', | |
idAttribute: 'guid', | |
endpoint: '/employers', | |
keepChangeHistory: true, | |
schema: { | |
name: 'string', |
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
{ | |
"data": [ | |
{ | |
"value": 1 | |
}, | |
{ | |
"value": 2 | |
}, | |
{ | |
"value": 3 |
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
var files = [ | |
'javascript/foo.js', | |
'css/bar.css', | |
'images/hello.png', | |
'images/world.jpg' | |
]; | |
var fileSends = files.map(function (filePath) { | |
//Loops over files, passing in file[index] as filePath | |
//It returns a new array based on whatever is returned from each function call |
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
var files = [ | |
'javascript/foo.js', | |
'css/bar.css', | |
'images/hello.png', | |
'images/world.jpg' | |
]; | |
var fileSends = files.map(function (filePath) { | |
//Loops over files, passing in file[index] as filePath | |
//It returns a new array based on whatever is returned from each function call |