Web Components

The Beginner's Guide to Content Projection in Angular

The Beginner's Guide to Content Projection in Angular

February 06, 2025

In this beginner-friendly tutorial, I’ll guide you through everything you need to know about Content Projection in Angular. You’ll learn how to inject dynamic content in components, create multiple content slots, use advanced techniques, and even implement fallback content for maximum flexibility. By the end, you’ll be able to build flexible, reusable components with ease.

Angular Styling Secrets: How to Use :host and :host-context Like a Pro

Angular Styling Secrets: How to Use :host and :host-context Like a Pro

January 23, 2025

Styling Angular components can be tricky, especially with encapsulated styles. But :host and :host-context let you target a component’s root element and adapt styles based on its context—without global CSS hacks. In this guide, you'll learn how to apply, modify, and control styles using these selectors, making your components smarter and more flexible. Let’s dive in!

Seriously Though, You Don't Need ::ng-deep

Seriously Though, You Don't Need ::ng-deep

January 16, 2025

Recently, I created a tutorial about how to avoid ::ng-deep when styling Angular components. Many of you didn’t like the techniques I provided so I thought it would be good to follow up to clear up some misconceptions and provide more specific examples. In short, I think you should try to avoid using it because its use is discouraged by the Angular team. In this example, I’ll explain why and I’ll show you some things that I like to do instead.