added user page and create a new modal from use with button and text
This commit is contained in:
37
src/app/components/modal-button/modal-button.ts
Normal file
37
src/app/components/modal-button/modal-button.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import {Component, input, Input} from '@angular/core';
|
||||
import {NzIconDirective} from "ng-zorro-antd/icon";
|
||||
import {NzModalComponent} from "ng-zorro-antd/modal";
|
||||
import {NzButtonComponent} from "ng-zorro-antd/button";
|
||||
|
||||
@Component({
|
||||
selector: 'app-modal-button',
|
||||
imports: [
|
||||
NzModalComponent,
|
||||
NzButtonComponent,
|
||||
],
|
||||
templateUrl: './modal-button.html',
|
||||
styleUrl: './modal-button.css',
|
||||
})
|
||||
|
||||
export class ModalButton {
|
||||
name = input.required<string>()
|
||||
|
||||
isVisible = false;
|
||||
isOkLoading = false;
|
||||
|
||||
showModal(): void {
|
||||
this.isVisible = true;
|
||||
}
|
||||
|
||||
handleOk(): void {
|
||||
this.isOkLoading = true;
|
||||
setTimeout(() => {
|
||||
this.isVisible = false;
|
||||
this.isOkLoading = false;
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
handleCancel(): void {
|
||||
this.isVisible = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user