X Tutup
Skip to content

Commit 03627aa

Browse files
committed
chore(format): update to latest formatter
Closes angular#7958
1 parent 83b8f59 commit 03627aa

File tree

527 files changed

+14082
-19359
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

+14082
-19359
lines changed

gulpfile.js

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

modules/angular1_router/src/ng_outlet.ts

Lines changed: 15 additions & 14 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(outlet.currentInstruction,
169-
outlet.previousInstruction));
168+
promise = $q.when(currentComponent.$routerOnActivate(
169+
outlet.currentInstruction, outlet.previousInstruction));
170170
}
171171
promise.then(outlet.deferredActivation.resolve, outlet.deferredActivation.reject);
172172
}
@@ -213,14 +213,15 @@ function ngLinkDirective($rootRouter, $parse) {
213213
function getLink(params) {
214214
navigationInstruction = router.generate(params);
215215

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-
});
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+
});
224225

225226
const navigationHref = navigationInstruction.toLinkUrl();
226227
return $rootRouter._location.prepareExternalUrl(navigationHref);
@@ -232,8 +233,8 @@ function ngLinkDirective($rootRouter, $parse) {
232233
let params = routeParamsGetter();
233234
element.attr('href', getLink(params));
234235
} else {
235-
scope.$watch(() => routeParamsGetter(scope), params => element.attr('href', getLink(params)),
236-
true);
236+
scope.$watch(
237+
() => routeParamsGetter(scope), params => element.attr('href', getLink(params)), true);
237238
}
238239

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

modules/angular2/core.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,7 @@ 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 {
14-
APP_ID,
15-
APP_COMPONENT,
16-
APP_INITIALIZER,
17-
PACKAGE_ROOT_URL,
18-
PLATFORM_INITIALIZER
19-
} from './src/core/application_tokens';
13+
export {APP_ID, APP_COMPONENT, APP_INITIALIZER, PACKAGE_ROOT_URL, PLATFORM_INITIALIZER} from './src/core/application_tokens';
2014
export * from './src/core/zone';
2115
export * from './src/core/render';
2216
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: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import {provide, Component} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
3-
import {
4-
CanActivate,
5-
RouteConfig,
6-
ComponentInstruction,
7-
APP_BASE_HREF,
8-
ROUTER_DIRECTIVES
9-
} from 'angular2/router';
3+
import {CanActivate, RouteConfig, ComponentInstruction, APP_BASE_HREF, ROUTER_DIRECTIVES} from 'angular2/router';
104

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

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

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

125
// #docregion routerCanDeactivate
136
@Component({

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

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

115
// #docregion routerOnActivate
126
@Component({template: `Child`})

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

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

115

126
@Injectable()
@@ -57,7 +51,6 @@ class AppCmp {
5751

5852
export function main() {
5953
return bootstrap(AppCmp, [
60-
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}),
61-
LogService
54+
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}), LogService
6255
]);
6356
}

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

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
import {Component, provide} from 'angular2/core';
22
import {bootstrap} from 'angular2/platform/browser';
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';
3+
import {CanActivate, RouteConfig, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF, CanReuse, RouteParams, OnReuse} from 'angular2/router';
134

145

156
// #docregion reuseCmp
@@ -53,6 +44,6 @@ class AppCmp {
5344

5445

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

0 commit comments

Comments
 (0)
X Tutup