【发布时间】:2020-07-13 22:31:12
【问题描述】:
在我们网站的编辑页面中,我有一个垫卡/工作区列表,每个工作区的顶角都有编辑图标。通过单击该编辑图标,它会将您带到该工作区的编辑页面,并且我在其中有一个删除按钮,当它单击时会显示一个对话框,并允许用户决定他们是否真的要删除该工作区。
不太确定如何处理 API 调用
.name.length > 0 && this.description.length > 0) {
//map
this.workspace.name = this.name;
this.workspace.description = this.description;
this.workspace.type = WorkspaceType.public; //all workspaces that are created are public by default
//create
this.workspaceService.createWorkspace(this.workspace).subscribe(workspace => {
this.saving = false;
this.gotoManage();
this.snackbar.open(this.workspace.name+ " has been created!!", "", {duration :2500});
}, () => this.saving = false);
}
}
【问题讨论】:
标签: html css angular function filter