本文整理汇总了TypeScript中angular2/core.EventEmitter.next方法的典型用法代码示例。如果您正苦于以下问题:TypeScript EventEmitter.next方法的具体用法?TypeScript EventEmitter.next怎么用?TypeScript EventEmitter.next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/core.EventEmitter
的用法示例。
在下文中一共展示了EventEmitter.next方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: selectUser
selectUser($event) {
let username = $event.target.value;
let user = this.users.find(u => u.username === username);
if (user !== null) {
this.selectedUser.next(user);
}
}
示例2: onAddTodo
private onAddTodo(todoInput: HTMLInputElement): void {
var value = todoInput.value.trim();
if(value == "") { return; }
this.added.next(value);
todoInput.value = "";
}
示例3: leaveEditMode
private leaveEditMode(inputElement: HTMLInputElement, save: boolean){
this.isEdit = false;
if(save){
this.valuechanged.next({
todoItem: this.todo,
value: inputElement.value.trim()
});
}
}
示例4: lanzarEvento
public lanzarEvento(orden: string, datos: any) {
this.resumenProcesoEvt.next(new DatosEvento(orden, datos));
}
示例5:
this.webSocket.onmessage = ((event) => {
this.emitter.next(event);
});
示例6: onCheckboxChange
private onCheckboxChange(checkbox: HTMLInputElement): void{
this.donechanged.next({
todoItem: this.todo,
done: checkbox.checked
});
}
示例7: filterChanged
filterChanged(event: any) {
event.preventDefault();
console.log(`Filter Changed: ${this.filter}`);
this.changed.next(this.filter);
}
示例8: changeMe
changeMe() {
this.num++;
this.fromParent = 'Changed from child. Count: ' + this.num;
this.fromParentChange.next(this.fromParent);
}
示例9: show
public show(object: Object): void {
this.show_details$.next(object);
}
示例10: noClick
noClick() {
this.no.next('n');
this.answer.next('n');
}