Join Gary Simon for an in-depth discussion in this video Updating articles, part of Angular 2+: Creating CRUD Apps.
- [Instructor] Let's give our blog app the ability…to update posts by reusing the same form that we created…in the previous video.…So once again, let's visit our API file…to create a new update endpoint.…Okay, so just to make thing a tad bit quicker,…I'm going to copy this and paste here…and I'll get everything right between here.…I'm going to change the endpoint URL to /update…and pass in the ID.…
We'll change Posting to Updating.…Now, we'll reference article.findById method…and we pass in…the request parameters id.…We use the execute function.…Inside of here, if error, we'll console.log it,…and then else, we'll say article.title…equals the request body title,…the content as well,…and then we'll choose article.save…and then the response will be json with the article.…
All right, great.…So now, as with before, let's restart the server,…node server js.…We'll go back, and let's also create the method…in our article.service file.…So let's just simply copy the insertArticle method.…We'll paste it here.…We'll go ahead and change this to updateArticle,…
- Angular Firebase CRUD
- Firebase setup
- Starting a project
- Defining the template
- CRUD apps with MongoDB
- MongoDB setup
- Creating a data service
- Home component
- Creating, updating, and deleting articles
Skill Level Intermediate
Angular 2: Widget-Based Architectureswith Derek Peruo52m 18s Intermediate
Angular 2 Essential Trainingwith Justin Schwartzenberger2h 45m Intermediate
1. Required Understanding
2. Angular Firebase CRUD
3. CRUD Apps with MongoDB (Back End)
4. CRUD Apps with MongoDB (Front End)
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.