refactor(EventEmitter): rename .next() to .emit()

BREAKING CHANGE:

EventEmitter#next(value) is deprecated, use EventEmitter#emit(value)
instead.

Closes #4287

Closes #5302
This commit is contained in:
Rob Wormald
2015-11-15 23:58:59 -08:00
parent 929abb9aa3
commit 3fa287aae2
44 changed files with 103 additions and 78 deletions

View File

@ -53,7 +53,7 @@ export class Location {
var browserBaseHref = this.platformStrategy.getBaseHref();
this._baseHref = stripTrailingSlash(stripIndexHtml(browserBaseHref));
this.platformStrategy.onPopState(
(_) => { ObservableWrapper.callNext(this._subject, {'url': this.path(), 'pop': true}); });
(_) => { ObservableWrapper.callEmit(this._subject, {'url': this.path(), 'pop': true}); });
}
/**

View File

@ -241,7 +241,7 @@ export class Router {
return PromiseWrapper.all(unsettledInstructions);
}
private _emitNavigationFinish(url): void { ObservableWrapper.callNext(this._subject, url); }
private _emitNavigationFinish(url): void { ObservableWrapper.callEmit(this._subject, url); }
private _afterPromiseFinishNavigating(promise: Promise<any>): Promise<any> {
return PromiseWrapper.catchError(promise.then((_) => this._finishNavigating()), (err) => {