@ -21,6 +21,8 @@ import {Component} from '@angular/core';
|
||||
})
|
||||
export class HashLocationComponent {
|
||||
location: Location;
|
||||
constructor(location: Location) { this.location = location; }
|
||||
constructor(location: Location) {
|
||||
this.location = location;
|
||||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
@ -21,6 +21,8 @@ import {Component} from '@angular/core';
|
||||
})
|
||||
export class PathLocationComponent {
|
||||
location: Location;
|
||||
constructor(location: Location) { this.location = location; }
|
||||
constructor(location: Location) {
|
||||
this.location = location;
|
||||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {modifiedInIvy} from '@angular/private/testing';
|
||||
import {$, ExpectedConditions, browser, by, element} from 'protractor';
|
||||
import {$, browser, by, element, ExpectedConditions} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../test-utils';
|
||||
|
||||
|
@ -7,7 +7,8 @@
|
||||
*/
|
||||
|
||||
import {modifiedInIvy} from '@angular/private/testing';
|
||||
import {$, ExpectedConditions, browser, by, element} from 'protractor';
|
||||
import {$, browser, by, element, ExpectedConditions} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../test-utils';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
|
@ -60,16 +60,16 @@ export class NgIfThenElse implements OnInit {
|
||||
thenBlock: TemplateRef<any>|null = null;
|
||||
show: boolean = true;
|
||||
|
||||
@ViewChild('primaryBlock', {static: true})
|
||||
primaryBlock: TemplateRef<any>|null = null;
|
||||
@ViewChild('secondaryBlock', {static: true})
|
||||
secondaryBlock: TemplateRef<any>|null = null;
|
||||
@ViewChild('primaryBlock', {static: true}) primaryBlock: TemplateRef<any>|null = null;
|
||||
@ViewChild('secondaryBlock', {static: true}) secondaryBlock: TemplateRef<any>|null = null;
|
||||
|
||||
switchPrimary() {
|
||||
this.thenBlock = this.thenBlock === this.primaryBlock ? this.secondaryBlock : this.primaryBlock;
|
||||
}
|
||||
|
||||
ngOnInit() { this.thenBlock = this.primaryBlock; }
|
||||
ngOnInit() {
|
||||
this.thenBlock = this.primaryBlock;
|
||||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
||||
|
@ -6,7 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {$, ExpectedConditions, browser, by, element} from 'protractor';
|
||||
import {$, browser, by, element, ExpectedConditions} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../test-utils';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
|
@ -24,18 +24,22 @@ export class AsyncPromisePipeComponent {
|
||||
|
||||
private resolve: Function|null = null;
|
||||
|
||||
constructor() { this.reset(); }
|
||||
constructor() {
|
||||
this.reset();
|
||||
}
|
||||
|
||||
reset() {
|
||||
this.arrived = false;
|
||||
this.greeting = new Promise<string>((resolve, reject) => { this.resolve = resolve; });
|
||||
this.greeting = new Promise<string>((resolve, reject) => {
|
||||
this.resolve = resolve;
|
||||
});
|
||||
}
|
||||
|
||||
clicked() {
|
||||
if (this.arrived) {
|
||||
this.reset();
|
||||
} else {
|
||||
this.resolve !('hi there!');
|
||||
this.resolve!('hi there!');
|
||||
this.arrived = true;
|
||||
}
|
||||
}
|
||||
@ -64,6 +68,8 @@ function setInterval(fn: Function, delay: number) {
|
||||
rootZone = rootZone.parent;
|
||||
}
|
||||
rootZone.run(() => {
|
||||
window.setInterval(function(this: unknown) { zone.run(fn, this, arguments as any); }, delay);
|
||||
window.setInterval(function(this: unknown) {
|
||||
zone.run(fn, this, arguments as any);
|
||||
}, delay);
|
||||
});
|
||||
}
|
||||
|
@ -6,7 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {$, ExpectedConditions, browser, by, element} from 'protractor';
|
||||
import {$, browser, by, element, ExpectedConditions} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../test-utils';
|
||||
|
||||
function waitForElement(selector: string) {
|
||||
|
@ -19,7 +19,9 @@ import {Component} from '@angular/core';
|
||||
})
|
||||
export class LowerUpperPipeComponent {
|
||||
// TODO(issue/24571): remove '!'.
|
||||
value !: string;
|
||||
change(value: string) { this.value = value; }
|
||||
value!: string;
|
||||
change(value: string) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
Reference in New Issue
Block a user