From the course: MongoDB Cloud Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Updating comments - MongoDB Tutorial
From the course: MongoDB Cloud Essential Training
Updating comments
- [Instructor] We have our app in a pretty good place and in this particular video, I'm going to be showing you how to implement the comment editor. Now let's just add another comment, new comment. And you can see that when we add a comment here, we have all these comments added. Now what we're going to try to do is to make sure that we can update a specific comment. So I'm going to head to the code first and in here I want you to open the method that adds the comment. So on common button clicked, not the delete button, so we're going to go there and that's where we want to do something like this, where we want to add. First of all, we want to add data.siteID equals and we're just kind of going to copy this particular piece of code. We're going to put that in there and what this does is, let's just make this, we using a data dash properties for HTML. Now I'm just trying to pass this ID around and I don't want to use the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.