In this video, learn about the special CSS selectors that Angular will look for and handle in CSS code with the Emulated view encapsulation mode.
- [Instructor] Styling elements within a component template … can be done within the component CSS … using common CSS selectors. … Adding styling to the host element … for the component, the element specified … by the selector metadata in the component decorator … needs to be handled a bit differently. … In fact, the way that the emulated ViewEncapsulation mode … handles it is similar to the ShadowDon approach. … The emulated mode will look … for a couple of special pseudo class selectors … in the component CSS. … Colon host and colon host-context. … And will handle shimming those … to scope them to the component. … Let's see how we can use these … to style the category list element … and even provide different style rules based … on any ancestors of the component element. … To begin with, we need to touch … on a styling scenario … that comes with custom elements. … When we create a component in Angular … and use a selector that targets a custom element, … like the mw-category-list selector value 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.