angular2-simple-ui
Version:
Angular 2 Simple Material Design UI Components customisable with Simple 30 KB CSS with LESS support and full features support , just plugin up and run for clarity look at sample examples
32 lines (27 loc) • 740 B
text/typescript
import {
Component,
Input,
Output,
EventEmitter
} from '@angular/core';
({
selector: 'sui-confirm',
templateUrl: '/sui.confirm.modal.component.html'
})
export class ConfirmModalComponent {
() confirmMessage: string;
() headerText: string = 'Confrim';
() yesBtnText: string = 'Yes';
() noBtnText: string = 'No';
() visible: boolean;
() response: EventEmitter<boolean> = new EventEmitter<boolean>();
constructor() { }
confirm() {
this.visible = !this.visible;
this.response.emit(true);
}
reject() {
this.visible = !this.visible;
this.response.emit(false);
}
}