Understand How to Style Angular Components
Course on egghead by Juri Strumpflohner
- 24 min
- LengthVideo runtime
- Subscription
- Price modelegghead plan
- 9
- Lessons
- 4.3
- Rating out of 513 ratings on egghead
- Aug 2017
- Published8 Aug 2017
About this course
Description from egghead
Developers usually have a love-hate relationship with CSS and styling user interfaces. But it is a fundamental part of creating nice-looking, adorable and successful user interfaces. In this course we will take a deep dive into the various possibilities Angular offers for styling components. We learn about the different APIs, how they allow us to conditionally apply one or multiple styles in the form of style attributes and CSS classes. We also explore the concept of style encapsulation and how it helps prevent our styles from leaking into other components.
What it covers
9 lessons
- 1Add styles to a component in Angular
- 2Style HTML elements in Angular using the style property
- 3Conditionally add a single CSS class to a DOM element in Angular
- 4Style HTML elements in Angular using ngClass
- 5Style HTML elements in Angular using ngStyle
- 6Use Angular style sanitization to mark dynamic styles as trusted values
- 7Use Angular’s @HostBinding and :host(...) to add styling to the component itself
- 8Use :host-context and the ::ng-deep selector to apply context-based styling
- 9Use the Renderer2 to add styles to an element in Angular
Similar Angular courses
Same topic, nearest in length, up to three from any one provider.
Data read from the egghead catalogue on 28 Nov 2026. How the data is collected.