Before going further, we can take the chance to add a Delete Quiz button to our QuizController and bind it to another event-handler method that will take care of the client-server interactions required to actually execute the delete action.
Let's start with creating the button in the quiz.component.html template file; we can put it just below the Edit button:
[...]<div> <input type="button" value="Edit" (click)="onEdit()" /> <input type="button" value="Delete this Quiz" (click)="onDelete()" /></div>[...]
Once done, add the following onDelete() method implementation in the quiz.component.ts file, right below the onEdit() method:
[...]onDelete() { if (confirm("Do you really want to delete this quiz?")) { var ...