Join Alexander Zanfir for an in-depth discussion in this video Create a message list view in Angular, part of MEAN Stack and MongoDB: Development Techniques.
- [Voiceover] Let's display a list of all our messages…with angular instead of just the raw data in our browser.…Let's begin by going back to our main.controller.js.…And here we will create a new function called get message.…Now we'll use http get…and with the same end point url.…So I will just copy this line…from post message and reuse it.…So first I'll change this to get.…And then we'll get rid of our second parameter…since we're not passing anything.…
Since http get returns a promise,…which is kind of like a callback,…we will attach dot then to the end…and supply an anonymous function as the callback,…which will take in the result.…And we'll add result as an argument.…So that we have access to it.…And then I'll simply display the result…to the console for now.…And before we try it out the last thing we need to do…is make sure our get message function gets called.…So we'll go back to the constructor and type in…this.getMessage.…
this.getMessage.…And since we're getting multiple messages…I'm going to change this to the plural form.…
- Installing and setting up your MEAN toolset
- Making an Angular post form
- Sending posts
- Displaying messages
- Creating a registration form
- Saving users
- Associating users with posts
- Authenticating users at login
Skill Level Intermediate
2. Message Posting
3. Display Messages
Save a user with Mongo13m 26s
5. Logging In
Next steps2m 5s
- 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.