Challenge: Create a Button to Delete Unanswered Questions
Let's create a button that triggers the deletion API to remove unanswered questions.
We'll cover the following
Requirements
In this challenge, we want you to implement a new Delete
button within the <li>
tags on our main webpage. This button should serve the purpose of removing unanswered questions that are currently displayed on the web page. We aim to design this button component in a manner that triggers a call to the DELETE
API, which has already been established in our QuestionController.cs
file located in the backend
folder.
Furthermore, you need to incorporate a page reloading function into this button's functionality. Specifically, upon pressing the delete button, we would like the page to reload automatically after a 3-second delay. This will enable us to observe the remaining unanswered questions.
Get hands-on with 1400+ tech skills courses.