- [Instructor] Let's focus on giving our blog app…the ability to show a specific article or document.…This will involve generating a component,…adding a new API endpoint,…and adding a new article service method.…So let's first use the Angular CLI tool…to generate the component,…ng g c, and article.…Next, let's visit our api.js file to add a new endpoint.…So we're going to go to server, and api.js.…
So just under here, I'm going to call it router.get…and this will be getting /articles/:id,…and we'll grab this ID in order to communicate with MongoDB.…Okay, next we'll simply console.log…the fact that we're requesting a specific article here…and inside of here, we'll use article.findById method…and we pass in the request params id,…and we use our execute function once again.…
We pass in an error and the response as article,…and inside of here we say if there's an error,…we'll console.log error getting the article,…and then else, or otherwise if it's successful,…we'll take our response .json and pass in…a response of article, and that is it,…
- 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
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.