Components can have their own custom events declared using the @Output decorator. In this video, learn how to accomplish that.
- [Instructor] Angular has an output decorator … that allows you to expose event bindings on components. … We can update the media item component, … and make use of the output decorator … to provide notifications of a delete request. … Using output is similar to how you use input. … First, we need to import the output decorator … from the Angular course code package. … to decorate a property on the component class … that we can name, delete. … The different with output is we want to set the property … to an event emitter object. … To do that, we need to import the event emitter, … which also comes from the Angular course code package. … So let's go up to our import statements … and add event emitter to the import statement … for the Angular course code package. … And then back down at the new property, … we can set that equal to a new event emitter. … to pass in a string value if you want to alias the property. … But again, it is recommended you only use the alias … So we will stick with a property name of delete here. …
- What is Angular?
- Working with components
- Binding events and properties
- Getting data to components
- Using directives and pipes
- Creating Angular forms
- Validating form data
- How Angular does dependency injection
- Making HTTP calls
- Styling components
Skill Level Intermediate
Angular: Building an Interfacewith Ray Villalobos2h 20m Intermediate
1. Architecture Overview
3. Directives and Pipes
5. Dependency Injection and Services
8. Styling Components
Next steps1m 20s
- 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.