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

@ -147,7 +147,7 @@ class OrderItemComponent {
@Input() item: OrderItem;
@Output() delete = new EventEmitter();
onDelete(): void { this.delete.next(this.item); }
onDelete(): void { this.delete.emit(this.item); }
}
@Component({

View File

@ -54,7 +54,7 @@ class Pane {
<table cellpadding="3">
<tr>
<td><ng-content></ng-content></td>
<td><user [handle]="user" (reset)="reset.next()"></user></td>
<td><user [handle]="user" (reset)="reset.emit()"></user></td>
</tr>
</table>
</pane>

View File

@ -11,9 +11,9 @@ export class Zippy {
toggle() {
this.visible = !this.visible;
if (this.visible) {
ObservableWrapper.callNext(this.open, null);
ObservableWrapper.callEmit(this.open, null);
} else {
ObservableWrapper.callNext(this.close, null);
ObservableWrapper.callEmit(this.close, null);
}
}
}