title: How to implement data delete function in Angular
body: <p>In the edit page of our website, I have a list of mat cards/workspaces and there are edit icon at the top corner of each workspaces. by click that edit icon, it took you to the edit page for that workspace and I have a delete button in there that show a dialog box when it click and allow user to decide if they really want to delete that workspace or not.</p>
  
  <p>Not really sure what to do for the API Call</p>
  
  <pre><code> .name.length &gt; 0 &amp;&amp; this.description.length &gt; 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 =&gt; {
          this.saving = false;
          this.gotoManage();
          this.snackbar.open(this.workspace.name+ " has been created!!", "", {duration :2500});
        }, () =&gt; this.saving = false);
  
      }
    }
  </code></pre>