revert(format): Revert "chore(format): update to latest formatter"
This reverts commit 03627aa84d.
This commit is contained in:
@@ -20,7 +20,7 @@ expect(door.lock instanceof Lock).toBe(true);
|
||||
// #enddocregion
|
||||
|
||||
// #docregion resolve_forward_ref
|
||||
var ref = forwardRef(() => 'refValue');
|
||||
expect(resolveForwardRef(ref)).toEqual('refValue');
|
||||
expect(resolveForwardRef('regularValue')).toEqual('regularValue');
|
||||
var ref = forwardRef(() => "refValue");
|
||||
expect(resolveForwardRef(ref)).toEqual("refValue");
|
||||
expect(resolveForwardRef("regularValue")).toEqual("regularValue");
|
||||
// #enddocregion
|
||||
@@ -27,7 +27,7 @@ export class AsyncPipeExample {
|
||||
if (this.arrived) {
|
||||
this.reset();
|
||||
} else {
|
||||
this.resolve('hi there!');
|
||||
this.resolve("hi there!");
|
||||
this.arrived = true;
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ export class AsyncPipeExample {
|
||||
// #enddocregion
|
||||
|
||||
// #docregion AsyncPipeObservable
|
||||
@Component({selector: 'task-cmp', template: 'Time: {{ time | async }}'})
|
||||
@Component({selector: "task-cmp", template: "Time: {{ time | async }}"})
|
||||
class Task {
|
||||
time = new Observable<number>((observer: Subscriber<number>) => {
|
||||
setInterval(() => observer.next(new Date().getTime()), 500);
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {CanActivate, RouteConfig, ComponentInstruction, APP_BASE_HREF, ROUTER_DIRECTIVES} from 'angular2/router';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
ComponentInstruction,
|
||||
APP_BASE_HREF,
|
||||
ROUTER_DIRECTIVES
|
||||
} from 'angular2/router';
|
||||
|
||||
function checkIfWeHavePermission(instruction: ComponentInstruction) {
|
||||
return instruction.params['id'] == '1';
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import {provide, Component} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {CanDeactivate, RouteConfig, RouteParams, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
|
||||
import {
|
||||
CanDeactivate,
|
||||
RouteConfig,
|
||||
RouteParams,
|
||||
ComponentInstruction,
|
||||
ROUTER_DIRECTIVES,
|
||||
APP_BASE_HREF
|
||||
} from 'angular2/router';
|
||||
|
||||
// #docregion routerCanDeactivate
|
||||
@Component({
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {OnActivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
|
||||
import {
|
||||
OnActivate,
|
||||
ComponentInstruction,
|
||||
RouteConfig,
|
||||
ROUTER_DIRECTIVES,
|
||||
APP_BASE_HREF
|
||||
} from 'angular2/router';
|
||||
|
||||
// #docregion routerOnActivate
|
||||
@Component({template: `Child`})
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import {Component, Injectable, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {OnDeactivate, ComponentInstruction, RouteConfig, ROUTER_DIRECTIVES, APP_BASE_HREF} from 'angular2/router';
|
||||
import {
|
||||
OnDeactivate,
|
||||
ComponentInstruction,
|
||||
RouteConfig,
|
||||
ROUTER_DIRECTIVES,
|
||||
APP_BASE_HREF
|
||||
} from 'angular2/router';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@@ -51,6 +57,7 @@ class AppCmp {
|
||||
|
||||
export function main() {
|
||||
return bootstrap(AppCmp, [
|
||||
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}), LogService
|
||||
provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/on_deactivate'}),
|
||||
LogService
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
import {Component, provide} from 'angular2/core';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {CanActivate, RouteConfig, ComponentInstruction, ROUTER_DIRECTIVES, APP_BASE_HREF, CanReuse, RouteParams, OnReuse} from 'angular2/router';
|
||||
import {
|
||||
CanActivate,
|
||||
RouteConfig,
|
||||
ComponentInstruction,
|
||||
ROUTER_DIRECTIVES,
|
||||
APP_BASE_HREF,
|
||||
CanReuse,
|
||||
RouteParams,
|
||||
OnReuse
|
||||
} from 'angular2/router';
|
||||
|
||||
|
||||
// #docregion reuseCmp
|
||||
@@ -44,6 +53,6 @@ class AppCmp {
|
||||
|
||||
|
||||
export function main() {
|
||||
return bootstrap(
|
||||
AppCmp, [provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
|
||||
return bootstrap(AppCmp,
|
||||
[provide(APP_BASE_HREF, {useValue: '/angular2/examples/router/ts/reuse'})]);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
import {describe, fdescribe, xdescribe, it, fit, xit, beforeEach, afterEach, beforeEachProviders, inject} from 'angular2/testing';
|
||||
import {
|
||||
describe,
|
||||
fdescribe,
|
||||
xdescribe,
|
||||
it,
|
||||
fit,
|
||||
xit,
|
||||
beforeEach,
|
||||
afterEach,
|
||||
beforeEachProviders,
|
||||
inject
|
||||
} from 'angular2/testing';
|
||||
import {provide} from 'angular2/core';
|
||||
|
||||
var db: any;
|
||||
@@ -19,9 +30,8 @@ fdescribe('some component', () => {
|
||||
// This test will run.
|
||||
});
|
||||
});
|
||||
describe('another component', () => {
|
||||
it('also has a test', () => { throw 'This test will not run.'; });
|
||||
});
|
||||
describe('another component',
|
||||
() => { it('also has a test', () => { throw 'This test will not run.'; }); });
|
||||
// #enddocregion
|
||||
|
||||
// #docregion xdescribe
|
||||
@@ -63,10 +73,9 @@ describe('some component', () => {
|
||||
// #docregion beforeEachProviders
|
||||
describe('some component', () => {
|
||||
beforeEachProviders(() => [provide(MyService, {useClass: MyMockService})]);
|
||||
it('uses MyService', inject(
|
||||
[MyService], (service: MyMockService) => {
|
||||
// service is an instance of MyMockService.
|
||||
}));
|
||||
it('uses MyService', inject([MyService], (service: MyMockService) => {
|
||||
// service is an instance of MyMockService.
|
||||
}));
|
||||
});
|
||||
// #enddocregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user