23 lines
		
	
	
		
			506 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			506 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { Component, EventEmitter, Input, Output } from '@angular/core';
 | |
| 
 | |
| // #docregion
 | |
| @Component({
 | |
|   moduleId: module.id,
 | |
|   selector: 'app-confirm',
 | |
|   templateUrl: 'confirm.component.html'
 | |
| })
 | |
| export class ConfirmComponent {
 | |
|   @Input() okMsg = '';
 | |
|   @Input('cancelMsg') notOkMsg = '';
 | |
|   @Output() ok = new EventEmitter();
 | |
|   @Output('cancel') notOk = new EventEmitter();
 | |
| 
 | |
|   onOkClick() {
 | |
|     this.ok.emit(true);
 | |
|   }
 | |
|   onNotOkClick() {
 | |
|     this.notOk.emit(true);
 | |
|   }
 | |
| }
 | |
| // #enddocregion
 |