本文整理汇总了TypeScript中angular2/core.EventEmitter.emit方法的典型用法代码示例。如果您正苦于以下问题:TypeScript EventEmitter.emit方法的具体用法?TypeScript EventEmitter.emit怎么用?TypeScript EventEmitter.emit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/core.EventEmitter
的用法示例。
在下文中一共展示了EventEmitter.emit方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: mealClicked
mealClicked(clickedMeal: Meal): void {
console.log('child', clickedMeal);
this.selectedMeal = clickedMeal;
this.onMealSelect.emit(clickedMeal);
}
示例2: addTask
addTask(userDescription: HTMLInputElement){
this.onSubmitNewTask.emit(userDescription.value);
userDescription.value = "";
}
示例3: kegClicked
kegClicked(clickedKeg: Keg): void {
console.log('child', clickedKeg);
this.selectedKeg = clickedKeg;
this.onKegSelect.emit(clickedKeg);
}
示例4: addTask
addTask(userDescription: HTMLInputElement, userPriority: HTMLInputElement){
var taskArray: string[] = [userDescription.value, userPriority.value];
this.onSubmitNewTask.emit(taskArray);
userDescription.value = "";
}
示例5: addTask
addTask(userDescription: HTMLInputElement, userPriority: HTMLSelectElement, userCategory: HTMLSelectElement){
this.onSubmitNewTask.emit([userDescription.value, userPriority.value, userCategory.value]);
userDescription.value = "";
}
示例6: clicked
clicked(product: Product): void {
this.currentProduct = product;
this.onProductSelected.emit(product);
}
示例7: submitEdit
submitEdit() {
this.onSubmitMealEdit.emit(true);
}
示例8: addKeg
addKeg(userBrand: HTMLInputElement, userPrice: HTMLInputElement, userAlcContent: HTMLInputElement){
this.onSubmitNewKeg.emit([userBrand.value, userPrice.value, userAlcContent.value]);
userBrand.value="";
userPrice.value="";
userAlcContent.value="";
}
示例9: addKeg
addKeg(kegName : HTMLInputElement, kegType : HTMLInputElement, kegABV : HTMLInputElement) {
var newKeg = new Keg (kegName.value, kegType.value, kegABV.value, 0);
this.onSubmitNewKeg.emit(newKeg);
}
示例10: onChange
onChange(value: string){
this.currentFilter.emit(value);
}