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
const festiveTextStyles = ` | |
font-size: 15rem; | |
text-align: center; | |
color: #fcedd8; | |
background: #BB2528; | |
font-family: 'Niconne', cursive; | |
font-weight: 700; | |
text-shadow: 5px 5px 0px #165B33, | |
10px 10px 0px #EA4630, | |
15px 15px 0px #146B3A, |
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 { Directive, OnDestroy, ElementRef } from '@angular/core'; | |
import { NgForm } from '@angular/forms'; | |
import { Subscription } from 'rxjs/Subscription'; | |
import { Observable } from 'rxjs/Observable'; | |
import * as _ from 'lodash'; | |
import 'rxjs/add/observable/combineLatest'; | |
@Directive({ selector: '[bsValidation]' }) | |
export class BSValidationDirective implements OnDestroy { | |
private sub: Subscription; |
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
// | |
// This can be used in Chrome console like: | |
// tagElementRecursive('',$0); | |
// | |
function tagElementRecursive(parentTag, node, index){ | |
const tag = [ | |
parentTag, | |
`${node.nodeName}_${index || 0}` | |
] | |
.filter(str => str) |
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 Foo { | |
constructor(id:number); | |
constructor(name:string); | |
constructor(public id:string|number){} | |
getId(){ | |
return this.id; // id: string|number | |
} | |
} |
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 * as ng from 'angular'; | |
import {stateProviderDecorator} from './state-provider-decorator'; | |
//In our module we load up the | |
ng.module('my-app', []) | |
.config(stateProviderDecorator) | |
.config(function($stateProvider){ | |
//Configure states normally | |
$stateProvider.state('main',{ |
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'; | |
function createWatchExpression(formName) { | |
var props = ['$pristine', '$dirty', '$valid', '$pending', '$submitted']; | |
return _.map(props, function (prop) { | |
return formName + "." + prop; | |
}); | |
} |
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
declare var Game: screeps.IGame; | |
declare module screeps { | |
export interface IGame { | |
cpuLimit: number; | |
creeps: { [screepName: string]: ICreep }; | |
flags: { [flagName: string]: IFlag }; | |
map: IMap; | |
rooms: { [roomName: string]: IRoom }; |
This file has been truncated, but you can view the full file.
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 e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){ | |
(function (global){ | |
'use strict'; | |
var core = require('../core'); | |
var microtask = require('../microtask'); | |
var browserPatch = require('../patch/browser'); | |
var es6Promise = require('es6-promise'); | |
if (global.Zone) { |
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
// Type definitions for Angular v2.0.0-local_sha.6c933a4 | |
// Project: http://angular.io/ | |
// Definitions by: angular team <https://github.com/angular/> | |
// Definitions: https://github.com/borisyankov/DefinitelyTyped | |
// *********************************************************** | |
// This file is generated by the Angular build process. | |
// Please do not create manual edits or send pull requests | |
// modifying this file. | |
// *********************************************************** |
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
bind(Http).toClass(FetchHttpAdapter) |
NewerOlder