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
[tabindex='-1']:focus { | |
outline: none; | |
} | |
input[type="search"] { | |
-webkit-appearance: textfield; | |
box-sizing: content-box; | |
-webkit-box-sizing: content-box; | |
} |
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
angular.module('services', []) | |
.service('MyService', ['$resource', MyService]); | |
function MyService($resource) { | |
var resource = $resource(...); | |
this.getAll() { | |
return resource.$get(...); | |
} |
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
import {Observer} from 'rxjs/Observer'; | |
import {Subject} from 'rxjs/Subject'; | |
export class FilterService { | |
private subject: Subject = new Subject(); | |
private _name: string; | |
private _tags: CollectionMatcher = { | |
values: [], | |
allMustMatch: false |
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
export class StringUtils { | |
// shamelessly ripped from http://www.davekoelle.com/alphanum.html | |
/** | |
* Returns whether or not the specified value is a string. | |
* @param value the value to check for a string type. | |
* @returns {boolean} whether or not the specified value is a string. | |
*/ | |
public static isString(value: any): boolean { |
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
{ | |
"inputs": [ | |
{ | |
"key": "close()", | |
"value": "A callback function that gets fired when an alert is closed. If the attribute exists, a close button is displayed as well." | |
} | |
], | |
"outputs": [ | |
] | |
} |
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
import {IngredientService} from './IngredientService'; | |
describe('test ingredient service', () => { | |
let service, _$httpBackend; | |
beforeEach(() => { | |
inject(($http, $httpBackend) => { | |
_$httpBackend = $httpBackend; | |
service = new IngredientService($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
{ | |
resolve: { | |
foo: ['$q', 'ModalService', 'MyService', ($q, ModalService, MyService) => { | |
return $q.resolve(ModalService.open() | |
.then(() => { | |
console.log('modal resolved'); | |
return MyService.doSomething(someData); | |
}) | |
.catch((error) => { | |
console.log('rejected'); |
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
class ScrollShadowCtrl { | |
static get $inject() { | |
return ['$window', '$scope', '$elment']; | |
} | |
constructor($window, $scope, $element) { | |
this.$window = $window; | |
this.$element = $element; |
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
angular.module('app', []) | |
.controller('MyController', MyController); | |
function MyController($scope) { | |
} | |
MyController.$inject = ['$scope']; |
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
import _remove from 'lodash/remove'; | |
export class AlertService { | |
static get $inject() { | |
return ['$timeout', '$rootScope', 'UuidFactory']; | |
} | |
constructor($timeout, $rootScope, UuidFactory) { | |
this.$timeout = $timeout; | |
this.$rootScope = $rootScope; |