Components can have their own custom properties declared using the @Input decorator. In this video, learn how to accomplish that.
- [Narrator] You can define properties … for components you create, and make them available … Let's refactor the media item component … to move away from the static content, … and support sending it a media item to display. … dot component dot ts file. … We need to import the input decorator to use it. … This comes from the Angular course scoped package. … And we already have an import statement for that. … The import statements support multiple import items … in the curly braces separated by commas. … So we can add input to the list. … The input decorator is designed … to be used on a class property. … Let's create a new class property … on the media item component class named media item. … And we'll decorate it with the input decorator, … placing the @ input with the parentheses … in front of the property. … This will tell Angular that we want it to support … any property bindings placed on instances … of the mw dash media dash item elements, … where the property name is media item. …
- 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.