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
import { OpaqueToken } from '@angular/core' | |
var win = typeof window !== 'undefined' && window || <any>{}; | |
export { win as window }; | |
function CONST_EXPR(expr) { | |
return expr; | |
} | |
function _window(): any { |
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
/* tslint:disable: variable-name max-line-length */ | |
import 'ts-helpers'; | |
const { | |
HotModuleReplacementPlugin, | |
DefinePlugin, | |
ProgressPlugin, | |
NoErrorsPlugin, | |
optimize: { | |
CommonsChunkPlugin |
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
const sortOther = function (a, b, sortBy, reverse) { | |
let nameA = a[sortBy]; | |
let nameB = b[sortBy]; | |
if (reverse) { | |
nameA = b[sortBy]; | |
nameB = a[sortBy]; | |
} | |
if (nameA < nameB) { | |
return -1; | |
} |
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
import { AbstractControl } from '@angular/forms'; | |
import { ValidatorFn } from '@angular/forms'; | |
export function minMax(min: number, max: number): ValidatorFn { | |
return (control: AbstractControl): { [key: string]: any } => { | |
return control.value < min || control.value > max ? | |
{ 'invalidNumber': true } : | |
<any>null; | |
}; | |
} |
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
<md-input | |
align="start" | |
[dividerColor]="dynamicControl.valid || (!dynamicControl.valid && dynamicControl.errors?.required) ? 'primary' : 'warn'" | |
floatingPlaceholder="true" | |
[placeholder]="(dynamicControl.errors?.required && !hideRequired) ? label + ' (required)' : label " | |
[formControl]="dynamicControl" | |
[hintLabel]="help"> | |
</md-input> | |
<button *ngIf="submit" type="submit" [disabled]="!form.valid">{{submit}}</button> |
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
@NgModule({ | |
imports: [ | |
CommonModule | |
], | |
declerations: [HomeComponent], | |
exports: [HomeComponent] | |
}) | |
export class HomeModule {} |
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
import { RouterConfig } from '@angular/router'; | |
import { | |
AffiliatesRoutes, | |
ConfigRoutes, | |
CreditsRoutes, | |
Dashboard, | |
OffersRoutes, | |
PrizesRoutes, | |
SitesRoutes, |
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
const MATERIAL_DESIGN_DIRECTIVES = [ | |
MdButton, | |
MdInput, | |
]; | |
@NgModule({ | |
imports: [ | |
BrowserModule, | |
ReactiveFormsModule, | |
FormsModule, |
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
import { FormControl } from '@angular/forms'; | |
import { AsyncValidatorFn, ValidatorFn } from '@angular/forms/src/directives/validators'; | |
import { Control } from '@angular/common'; | |
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import { ReplaySubject } from 'rxjs/ReplaySubject'; | |
import { API_USER_URL } from '../services/constants'; | |
@Injectable() |
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
import { | |
Component, | |
ChangeDetectionStrategy, | |
ChangeDetectorRef, | |
Input | |
} from 'angular2/core'; | |
import {ROUTER_DIRECTIVES} from 'angular2/router'; | |
import {APPLICATION_VALIDATORS} from './application-validators'; | |
import {FocusOn} from './focus-on.directive.ts'; | |
import {Control} from 'angular2/common'; |
NewerOlder