chore(facade): remove most facade/async functions

This commit is contained in:
Jason Choi
2016-08-02 15:53:34 -07:00
committed by Alex Rickabaugh
parent 6baf3baedd
commit 99989f5d3f
184 changed files with 1609 additions and 1698 deletions

View File

@ -8,7 +8,6 @@
import {NgIf} from '@angular/common';
import {Component} from '@angular/core';
import {TimerWrapper} from '@angular/core/src/facade/async';
import {bootstrap} from '@angular/platform-browser-dynamic';
@Component({
@ -49,7 +48,7 @@ class AsyncApplication {
delayedIncrement(): void {
this.cancelDelayedIncrement();
this.timeoutId = TimerWrapper.setTimeout(() => {
this.timeoutId = setTimeout(() => {
this.val2++;
this.timeoutId = null;
}, 2000);
@ -65,7 +64,7 @@ class AsyncApplication {
return;
}
self.multiTimeoutId = TimerWrapper.setTimeout(() => {
self.multiTimeoutId = setTimeout(() => {
self.val3++;
helper(_i - 1);
}, 500);
@ -75,26 +74,26 @@ class AsyncApplication {
periodicIncrement(): void {
this.cancelPeriodicIncrement();
this.intervalId = TimerWrapper.setInterval(() => { this.val4++; }, 2000)
this.intervalId = setInterval(() => { this.val4++; }, 2000)
};
cancelDelayedIncrement(): void {
if (this.timeoutId != null) {
TimerWrapper.clearTimeout(this.timeoutId);
clearTimeout(this.timeoutId);
this.timeoutId = null;
}
};
cancelMultiDelayedIncrements(): void {
if (this.multiTimeoutId != null) {
TimerWrapper.clearTimeout(this.multiTimeoutId);
clearTimeout(this.multiTimeoutId);
this.multiTimeoutId = null;
}
};
cancelPeriodicIncrement(): void {
if (this.intervalId != null) {
TimerWrapper.clearInterval(this.intervalId);
clearInterval(this.intervalId);
this.intervalId = null;
}
};