chore(format): update to latest formatter

Closes #7958
This commit is contained in:
Alex Eagle
2016-04-07 17:17:50 -07:00
committed by Alex Eagle
parent 83b8f59297
commit 03627aa84d
527 changed files with 13975 additions and 19252 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,5 @@
import {Component, Injectable} from 'angular2/core';
import {
RouterLink,
RouteConfig,
Router,
Route,
RouterOutlet,
Location,
RouteParams
} from 'angular2/router';
import {RouterLink, RouteConfig, Router, Route, RouterOutlet, Location, RouteParams} from 'angular2/router';
import * as db from './data';
import {PromiseWrapper} from 'angular2/src/facade/async';
import {isPresent, DateWrapper} from 'angular2/src/facade/lang';
@ -72,8 +64,8 @@ class DbService {
}
emails(): Promise<any[]> {
return this.getData().then((data: any[]): any[] =>
data.filter(record => !isPresent(record['draft'])));
return this.getData().then(
(data: any[]): any[] => data.filter(record => !isPresent(record['draft'])));
}
email(id): Promise<any> {
@ -107,18 +99,19 @@ class InboxCmp {
constructor(public router: Router, db: DbService, params: RouteParams) {
var sortType = params.get('sort');
var sortEmailsByDate = isPresent(sortType) && sortType == "date";
var sortEmailsByDate = isPresent(sortType) && sortType == 'date';
PromiseWrapper.then(db.emails(), (emails: any[]) => {
this.ready = true;
this.items = emails.map(data => new InboxRecord(data));
if (sortEmailsByDate) {
this.items.sort((a: InboxRecord, b: InboxRecord) =>
DateWrapper.toMillis(DateWrapper.fromISOString(a.date)) <
DateWrapper.toMillis(DateWrapper.fromISOString(b.date)) ?
-1 :
1);
this.items.sort(
(a: InboxRecord, b: InboxRecord) =>
DateWrapper.toMillis(DateWrapper.fromISOString(a.date)) <
DateWrapper.toMillis(DateWrapper.fromISOString(b.date)) ?
-1 :
1);
}
});
}

View File

@ -4,6 +4,6 @@ import {bootstrap} from 'angular2/platform/browser';
import {ROUTER_PROVIDERS, HashLocationStrategy, LocationStrategy} from 'angular2/router';
export function main() {
bootstrap(InboxApp,
[ROUTER_PROVIDERS, provide(LocationStrategy, {useClass: HashLocationStrategy})]);
bootstrap(
InboxApp, [ROUTER_PROVIDERS, provide(LocationStrategy, {useClass: HashLocationStrategy})]);
}