Skip to content

Commit 60727c4

Browse files
committed
revert(format): Revert "chore(format): update to latest formatter"
This reverts commit 03627aa.
1 parent 03627aa commit 60727c4

File tree

527 files changed

+19359
-14082
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

527 files changed

+19359
-14082
lines changed

gulpfile.js

Lines changed: 345 additions & 379 deletions
Large diffs are not rendered by default.

modules/angular1_router/src/ng_outlet.ts

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function ngOutletDirective($animate, $q: ng.IQService, $rootRouter) {
7878
result = this.currentController.$routerCanReuse(nextInstruction, this.currentInstruction);
7979
} else {
8080
result = nextInstruction === this.currentInstruction ||
81-
angular.equals(nextInstruction.params, this.currentInstruction.params);
81+
angular.equals(nextInstruction.params, this.currentInstruction.params);
8282
}
8383
return $q.when(result);
8484
}
@@ -110,7 +110,7 @@ function ngOutletDirective($animate, $q: ng.IQService, $rootRouter) {
110110
}
111111

112112
this.controller.$$template = '<' + dashCase(componentName) + ' $router="::$$router"></' +
113-
dashCase(componentName) + '>';
113+
dashCase(componentName) + '>';
114114
this.controller.$$router = this.router.childRouter(instruction.componentType);
115115
this.controller.$$outlet = this;
116116

@@ -165,8 +165,8 @@ function routerTriggerDirective($q) {
165165
var currentComponent = outlet.currentController =
166166
element.controller(ngOutletCtrl.$$componentName);
167167
if (currentComponent.$routerOnActivate) {
168-
promise = $q.when(currentComponent.$routerOnActivate(
169-
outlet.currentInstruction, outlet.previousInstruction));
168+
promise = $q.when(currentComponent.$routerOnActivate(outlet.currentInstruction,
169+
outlet.previousInstruction));
170170
}
171171
promise.then(outlet.deferredActivation.resolve, outlet.deferredActivation.reject);
172172
}
@@ -213,15 +213,14 @@ function ngLinkDirective($rootRouter, $parse) {
213213
function getLink(params) {
214214
navigationInstruction = router.generate(params);
215215

216-
scope.$watch(
217-
function() { return router.isRouteActive(navigationInstruction); },
218-
function(active) {
219-
if (active) {
220-
element.addClass('ng-link-active');
221-
} else {
222-
element.removeClass('ng-link-active');
223-
}
224-
});
216+
scope.$watch(function() { return router.isRouteActive(navigationInstruction); },
217+
function(active) {
218+
if (active) {
219+
element.addClass('ng-link-active');
220+
} else {
221+
element.removeClass('ng-link-active');
222+
}
223+
});
225224

226225
const navigationHref = navigationInstruction.toLinkUrl();
227226
return $rootRouter._location.prepareExternalUrl(navigationHref);
@@ -233,8 +232,8 @@ function ngLinkDirective($rootRouter, $parse) {
233232
let params = routeParamsGetter();
234233
element.attr('href', getLink(params));
235234
} else {
236-
scope.$watch(
237-
() => routeParamsGetter(scope), params => element.attr('href', getLink(params)), true);
235+
scope.$watch(() => routeParamsGetter(scope), params => element.attr('href', getLink(params)),
236+
true);
238237
}
239238

240239
element.on('click', event => {

modules/angular2/core.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ export * from './src/core/di';
1010
export * from './src/facade/facade';
1111
export {enableProdMode} from 'angular2/src/facade/lang';
1212
export {platform, createNgZone, PlatformRef, ApplicationRef} from './src/core/application_ref';
13-
export {APP_ID, APP_COMPONENT, APP_INITIALIZER, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER} from './src/core/application_tokens';
13+
export {
14+
APP_ID,
15+
APP_COMPONENT,
16+
APP_INITIALIZER,
17+
PACKAGE_ROOT_URL,
18+
PLATFORM_INITIALIZER
19+
} from './src/core/application_tokens';
1420
export * from './src/core/zone';
1521
export * from './src/core/render';
1622
export * from './src/core/linker';

modules/angular2/examples/core/di/ts/forward_ref/forward_ref.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ expect(door.lock instanceof Lock).toBe(true);
2020
// #enddocregion
2121

2222
// #docregion resolve_forward_ref
23-
var ref = forwardRef(() => 'refValue');
24-
expect(resolveForwardRef(ref)).toEqual('refValue');
25-
expect(resolveForwardRef('regularValue')).toEqual('regularValue');
23+
var ref = forwardRef(() => "refValue");
24+
expect(resolveForwardRef(ref)).toEqual("refValue");
25+
expect(resolveForwardRef("regularValue")).toEqual("regularValue");
2626
// #enddocregion

modules/angular2/examples/core/pipes/ts/async_pipe/async_pipe_example.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export class AsyncPipeExample {
2727
if (this.arrived) {
2828
this.reset();
2929
} else {
30-
this.resolve('hi there!');
30+
this.resolve("hi there!");
3131
this.arrived = true;
3232
}
3333
}
3434
}
3535
// #enddocregion
3636

3737
// #docregion AsyncPipeObservable
38-
@Component({selector: 'task-cmp', template: 'Time: {{ time | async }}'})
38+
@Component({selector: "task-cmp", template: "Time: {{ time | async }}"})
3939
class Task {
4040
time = new Observable<number>((observer: Subscriber<number>) => {
4141
setInterval(() => observer.next(new Date().getTime()), 500);

modules/angular2/examples/router/ts/can_activate/can_activate_example.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import {provide, Component} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {CanActivate, RouteConfig, ComponentInstruction, APP_BASE_HREF, ROUTER_DIRECTIVES} from 'angular2/router';
3+
import {
4+
CanActivate,
5+
RouteConfig,
6+
ComponentInstruction,
7+
APP_BASE_HREF,
8+
ROUTER_DIRECTIVES
9+
} from 'angular2/router';
410

511
function checkIfWeHavePermission(instruction: ComponentInstruction) {
612
return instruction.params['id'] == '1';

modules/angular2/examples/router/ts/can_deactivate/can_deactivate_example.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import {provide, Component} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {CanDeactivate, RouteConfig, RouteParams, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
3+
import {
4+
CanDeactivate,
5+
RouteConfig,
6+
RouteParams,
7+
ComponentInstruction,
8+
ROUTER_DIRECTIVES,
9+
APP_BASE_HREF
10+
} from 'angular2/router';
411

512
// #docregion routerCanDeactivate
613
@Component({

modules/angular2/examples/router/ts/on_activate/on_activate_example.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import {Component, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {OnActivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
3+
import {
4+
OnActivate,
5+
ComponentInstruction,
6+
RouteConfig,
7+
ROUTER_DIRECTIVES,
8+
APP_BASE_HREF
9+
} from 'angular2/router';
410

511
// #docregion routerOnActivate
612
@Component({template: `Child`})

modules/angular2/examples/router/ts/on_deactivate/on_deactivate_example.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import {Component, Injectable, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {OnDeactivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
3+
import {
4+
OnDeactivate,
5+
ComponentInstruction,
6+
RouteConfig,
7+
ROUTER_DIRECTIVES,
8+
APP_BASE_HREF
9+
} from 'angular2/router';
410

511

612
@Injectable()
@@ -51,6 +57,7 @@ class AppCmp {
5157

5258
export function main() {
5359
return bootstrap(AppCmp, [
54-
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}), LogService
60+
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}),
61+
LogService
5562
]);
5663
}

modules/angular2/examples/router/ts/reuse/reuse_example.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
import {Component, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {CanActivate, RouteConfig, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF, CanReuse, RouteParams, OnReuse} from 'angular2/router';
3+
import {
4+
CanActivate,
5+
RouteConfig,
6+
ComponentInstruction,
7+
ROUTER_DIRECTIVES,
8+
APP_BASE_HREF,
9+
CanReuse,
10+
RouteParams,
11+
OnReuse
12+
} from 'angular2/router';
413

514

615
// #docregion reuseCmp
@@ -44,6 +53,6 @@ class AppCmp {
4453

4554

4655
export function main() {
47-
return bootstrap(
48-
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
56+
return bootstrap(AppCmp,
57+
[provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
4958
}

0 commit comments

Comments
 (0)