It's useful to pass events upwards towards the main component and handle data operations there. Learn how to do that, by using the @Output decorator in this video.
- [Instructor] Next, let's talk about how you…can handle and manage events in our interface.…So what we want to do is make these Xs right here…actually clickable and delete the individual records.…We're going to handle the deletion with a really…nice library called lodash, so that part…will be really easy.…We'll focus on creating what we need to in the interface.…And actually we'll go into the list component first.…Here is the button that should cause the deletion.…
And so the way that, in your template you specify…that an event is going to fire is by using…this parentheses notation.…And in here you put the name of the event.…So the event that we want is click…and what we want it to do is execute a method…called handle delete when we click on this button.…And I'm going to pass it along information…about the item.…So remember, as we're using NG for here,…a temporary variable called item gets generated…as we're looping through each of the different appointments.…
And that's what we're passing, the actual…appointment with all of the information…
- Building custom Angular projects
- Working with subcomponents
- Adding icons
- Adding search functionality
- Using lifecycle methods
- Managing list data
- Indexing your data
- Updating records
Skill Level Intermediate
Using the exercise files1m 43s
1. Building Custom Angular Projects
2. Working with Subcomponents
3. Creating More Subcomponents
Managing form submission8m 33s
4. Managing List Data
Next steps1m 8s
- 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.