From the course: MongoDB Cloud Essential Training

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Implementing comment deletion

Implementing comment deletion - MongoDB Tutorial

From the course: MongoDB Cloud Essential Training

Implementing comment deletion

- [Instructor] Our site detail currently looks really good. Let's go ahead and add another comment. New comment and we'll have a lot of comments show up, obviously right now, when you load the page, all the comments will show up, but that's not really what we're after in this particular video. In this particular video, I'm going to show you how to delete a comment. Now in order to do this, we're just going to need to go back to decode and wire up a few things. So let's head to decode. We had to decode and I want you to open the site detail, and I want you to scroll all the way down to the point at which you create the single comment fragment. In my case, you'd see that in line 204 to line 217. Now the first thing we're going to do is to wire this up to click event. So on click equals on delete button clicked, and I'm just going to pass in this, which means the Dom element is going to be sent across. To make this…

Contents