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
App.directive('isFocused', function(){ | |
var isFocused = { | |
restrict: 'A', | |
scope: { | |
model: '=isFocused' | |
}, | |
link: function(scope, element, attrs) { | |
scope.model = false; | |
element.focus(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
'use strict'; | |
angular.module('AppSuccess') | |
.directive('scrollSpy', ['$window', function ($window) { | |
return { | |
restrict: 'A', | |
link: function (scope, element) { | |
// Get offset before scrollSpy activates | |
// otherwise offset of element would change |
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
app.directive('verticalAlign', function () { | |
return { | |
restrict: 'A', | |
link: function (scope, elm, attrs) { | |
var childHeight = elm[0].clientHeight; | |
var parentHeight = elm[0].parentElement.clientHeight; | |
var offset = (parentHeight - childHeight) / 2; | |
elm[0].style.paddingTop = offset + 'px'; | |
} | |
} |
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 webdriver = require('browserstack-webdriver'); | |
var browserNameList : ['firefox', 'chrome', 'opera']; | |
for(i = 0; i < browserList; i++) { | |
// Input capabilities | |
var capabilities = { | |
'browserName' : browserNameList[i], | |
'browserstack.user' : 'xxx', |
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 assert = require('assert'), | |
fs = require('fs'); | |
var webdriver = require('browserstack-webdriver'), | |
test = require('browserstack-webdriver/testing'); | |
var browserNameList = ['ie', 'firefox', 'opera']; | |
for(i = 0; i < browserNameList.length; i++) { | |
test.describe('Google Search', 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
'use strict'; | |
angular.module('app.photo') | |
.controller('EditPhotoCtrl', function($scope, $state, $location, $window, | |
UserService, PhotoService, UtilitiesService) { | |
/** | |
* INIT VALUES | |
*/ |
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('app.picture') | |
.directive('pictureList', function() { | |
return { | |
restrict: 'E', | |
scope: { | |
pictures: '=' |
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'; | |
describe('PhotoCtrl', function() { | |
var ctrl, rootScope, scope, q, Mock; | |
beforeEach(angular.mock.module('app.photo', 'ui.router')); | |
beforeEach(inject(function($controller, _$rootScope_, _$location_, _$state_, _$q_) { |
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
beforeEach(inject(function(_) { | |
underScoreService = _; | |
})); | |
it('should do something', function () { | |
expect(underScoreService).toBe(true); | |
}); |
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 git = require('gulp-git'); | |
var inject = require('inject-string'); | |
// This successfully returns my git hash | |
gulp.task('hash', function() { | |
git.revParse({args:'--short HEAD'}, function (err, hash) { | |
return hash; | |
});) | |
}) |
OlderNewer