chore(facade): remove most facade/async functions
This commit is contained in:

committed by
Alex Rickabaugh

parent
6baf3baedd
commit
99989f5d3f
@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
import {TimerWrapper} from '@angular/core/src/facade/async';
|
||||
import {EventListener} from '@angular/core/src/facade/browser';
|
||||
|
||||
import {FileReader, Uint8ArrayWrapper} from './file_api';
|
||||
@ -44,7 +43,7 @@ export class ImageDemo {
|
||||
for (var i = 0; i < this.images.length; i++) {
|
||||
this.images[i].filtering = true;
|
||||
|
||||
TimerWrapper.setTimeout(this._filter(i), 0);
|
||||
setTimeout(this._filter(i), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
import {PromiseWrapper} from '@angular/core/src/facade/async';
|
||||
import {PRIMITIVE, ServiceMessageBrokerFactory} from '@angular/platform-browser';
|
||||
|
||||
const ECHO_CHANNEL = 'ECHO';
|
||||
@ -20,6 +19,12 @@ export class App {
|
||||
}
|
||||
|
||||
private _echo(val: string) {
|
||||
return PromiseWrapper.wrap(() => { return val; });
|
||||
return new Promise((res, rej) => {
|
||||
try {
|
||||
res(val);
|
||||
} catch (e) {
|
||||
rej(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user