Modal confirms that the callback will not disappear automatically.

< nz-modal [(nzVisible)] = "isShow" [nzTitle] = "title" [nzContent] = "modalContent" [nzFooter] = "modalFooter" (nzOnCancel) = "handleCancel ()" >
< ng-template-sharpmodalContent >

<div  class="content">
</div>

< / ng-template >
< ng-template-sharpmodalFooter >

<button nz-button [nzType]=""primary"" (click)="handleOk()" [nzLoading]="isLoading"></button>
<button nz-button [nzType]=""default"" (click)="handleCancel()"></button>

< / ng-template >
< / nz-modal >
ts
public isShow = false;
public isLoading = false;
/ / cancel
public handleCancel () {

this.isShow = false;

}
/ / confirm
public handleOk () {

this.isLoading = true;
this.param["name"] = this.inputValue
this.roleManagementService.addModifyDepartment(this.param).subscribe((res: any) => {
  if (res.status === 0) {
     console.log(res.data)
  } else {
      console.log(res.data)
  }
  this.isLoading = false;
  this.isShow = false;
});

}


angularjs cannot listen to promise for data requests other than the functions encapsulated by itself. Either force the update manually, or modify the request function, such as "$http.get (.)"

reference https://codeshelper.com/q/10.


if it is Chrome, click F12 to see if there are any errors in development mode

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3156b-2bd7e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3156b-2bd7e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?