当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript core.EventEmitter类代码示例

本文整理汇总了TypeScript中angular2/core.EventEmitter的典型用法代码示例。如果您正苦于以下问题:TypeScript EventEmitter类的具体用法?TypeScript EventEmitter怎么用?TypeScript EventEmitter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了EventEmitter类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: closeAlert

 closeAlert() {
     this.closeAlertEventEmitter.emit();
 }
开发者ID:txf7337,项目名称:angular2-alert,代码行数:3,代码来源:alert.service.ts

示例2: addTask

 addTask(newDescription){
   this.onSubmitNewTask.emit(newDescription.value);
   newDescription.value="";
 }
开发者ID:mgoren,项目名称:hello-angular,代码行数:4,代码来源:new-task.component.ts

示例3: deleteEntry

 deleteEntry(entry: Entry){
   this.onSubmitDeleteEntry.emit(entry);
 }
开发者ID:dmdiehr,项目名称:CalorieCounter,代码行数:3,代码来源:edit-entry-details.component.ts

示例4: onPageSizeChanged

 onPageSizeChanged(pageSize : number){
     this.pageDetails.pageSize = +pageSize;
     this.changed.emit(null);
 }
开发者ID:danthomas,项目名称:ng2,代码行数:4,代码来源:paging.component.ts

示例5: pushStateToSubscribers

 // This method can be called by subscribers to force a push.  Useful when a
 // component is initialized.
 pushStateToSubscribers() {
     let persistenceState = this.getState();
     console.log('PersistenceService publishing state change:', persistenceState);
     this.persistenceStateChanged.next(persistenceState);
 }
开发者ID:allash,项目名称:angular2-seed-example-mashup,代码行数:7,代码来源:PersistenceService.ts

示例6: addKeg

 addKeg(userName: HTMLInputElement, userBrand: HTMLInputElement, userPrice: HTMLInputElement, userPintsLeft: HTMLInputElement) {
   var newKeg: Keg = new Keg(userName.value, userBrand.value, userPrice.value, userPintsLeft.valueAsNumber, 0);
   this.onSubmitNewKeg.emit(newKeg);
 }
开发者ID:jos-h20,项目名称:tap_room_angular2,代码行数:4,代码来源:new-keg.component.ts

示例7: addTask

 addTask(userDescription: HTMLInputElement, userPriority: HTMLInputElement){
   var newTask = [userDescription.value, userPriority.value];
   this.onSubmitNewTask.emit(newTask);
   userDescription.value = "";
   userPriority.value="low";
 }
开发者ID:polina13,项目名称:JS-To-Do-Angular,代码行数:6,代码来源:new-task.component.ts

示例8: closeDetailsField

 closeDetailsField() {
   this.closeDetails.emit(1);
 }
开发者ID:milleraundra,项目名称:calorie_tracker,代码行数:3,代码来源:food-details.component.ts

示例9: onSelect

 onSelect(strain) {
   this.emitter.emit(strain);
 }
开发者ID:waitbutmetho,项目名称:Budtendr,代码行数:3,代码来源:strain-view.component.ts

示例10: newTask

 newTask(newDescription: HTMLInputElement): void {
   this.onSubmitNewTask.emit(newDescription.value);
   newDescription.value = "";
 }
开发者ID:Hreacon,项目名称:js-week2-angular-todolist,代码行数:4,代码来源:new-task.component.ts


注:本文中的angular2/core.EventEmitter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。