Angular Development Tutorials

This website is Brian Treese's Angular Development Blog. The site provides practical, hands-on tutorials and resources for developers who use the Angular framework. The tutorials cover modern Angular techniques including Signals, Components, Forms, Animations, CDK (Component Dev Kit), and Styling. Each tutorial includes code examples, video demonstrations, and step-by-step instructions to help you build Angular applications.

Angular Enter/Leave Animations in 2025: Old vs New

Angular Enter/Leave Animations in 2025: Old vs New

July 31, 2025

Angular's deprecated animations module is being replaced by a new enter/leave animation API that's lighter, hardware-accelerated, and simpler than the old DSL-based system. This tutorial demonstrates how to migrate from the legacy :enter and :leave animations to Angular's new animation primitives, showing how to create smooth enter/leave transitions using modern CSS animations and Angular's new animation helpers. You'll learn how to build professional animations without the deprecated module.

Build the Perfect “Show More” Component in Angular

Build the Perfect “Show More” Component in Angular

July 24, 2025

Expandable content components are essential for long-form content, but implementing smooth height transitions requires handling dynamic content heights, coordinating CSS animations, and managing state. This tutorial demonstrates how to build a professional "show more" component in Angular with smooth height transitions, fade effects, and proper state management. You'll learn how to measure content height dynamically, create elegant expand/collapse animations, and handle edge cases like nested content and responsive layouts.

Just Another Angular CDK Feature Nobody Talks About

Just Another Angular CDK Feature Nobody Talks About

July 17, 2025

Treating all focus events identically creates poor user experiences—keyboard users see aggressive error messages meant for mouse interactions, and programmatic focus triggers unwanted UI changes. The Angular CDK's Focus Monitor detects how users interact with elements, distinguishing between mouse clicks, keyboard navigation, touch, and programmatic focus. This tutorial demonstrates how to use Focus Monitor to create adaptive UIs that respond intelligently to different interaction patterns, improving accessibility and user experience.

One Slot? Two Slots? Conditional Slots? Solved.

One Slot? Two Slots? Conditional Slots? Solved.

July 10, 2025

Multi-slot content projection in Angular enables flexible component APIs, but managing multiple slots, conditional projection, and fallback content requires understanding Angular's content projection system. This tutorial demonstrates how to create components with multiple named slots, handle conditional content projection, provide fallback content when slots are empty, and conditionally render the same slot in different locations based on component state.

Can linkedSignal Use Multiple Sources? Yes, Here’s How!

Can linkedSignal Use Multiple Sources? Yes, Here’s How!

July 03, 2025

Combining multiple reactive sources in Angular often requires complex RxJS operator chains, creating hard-to-maintain code. Angular's linkedSignal() simplifies this by creating writable signals that derive from multiple sources, enabling two-way binding scenarios and complex reactive patterns without Observable complexity. This tutorial demonstrates how to use linkedSignal() to combine multiple signals, create reactive two-way bindings, and build modern Angular components with cleaner, more maintainable code.

I Updated My Component Host Animation… Here’s the Angular 20 Way

I Updated My Component Host Animation… Here’s the Angular 20 Way

June 26, 2025

Modernizing legacy Angular applications requires replacing deprecated decorators with modern APIs, but knowing what to update and how can be overwhelming. This tutorial demonstrates step-by-step modernization using Angular's latest features: host element bindings replacing @HostBinding and @HostListener, control flow syntax replacing structural directives, and signal inputs replacing @Input decorators. You'll learn how to modernize an existing application, reducing code size and improving performance while maintaining functionality.

Event Listening in Angular: The Updated Playbook for 2025

Event Listening in Angular: The Updated Playbook for 2025

June 19, 2025

Event handling in Angular has evolved significantly, with modern patterns replacing deprecated decorators and improving type safety. This updated tutorial demonstrates the latest event listening techniques in Angular, covering template event bindings, host event bindings, Renderer2 for global events, and the output() function for component communication. You'll learn when to use each approach and how to avoid deprecated patterns like @HostListener and @Output decorators.

Step-by-Step: Create a Click Outside Directive in Angular

Step-by-Step: Create a Click Outside Directive in Angular

June 12, 2025

Dropdown menus and popovers need to close when users click outside them, but implementing click-outside detection requires handling event propagation, component references, and edge cases. This tutorial demonstrates how to build a reusable click-outside directive in Angular that detects clicks outside target elements, handles common bugs like immediate closure, and provides a clean API for any component that needs outside-click detection.

I Built a “Cooldown” Button in Angular… Here’s How

I Built a “Cooldown” Button in Angular… Here’s How

June 05, 2025

Double-submit buttons create poor user experiences and can cause duplicate API calls, form submissions, or unintended actions. Cooldown buttons prevent this by disabling themselves after clicks, showing countdown timers, and preventing rapid-fire interactions. This tutorial demonstrates how to build a reusable cooldown button component in Angular using signals for state management and setInterval for countdown functionality, creating a pattern you can use throughout your application.

Show It Once, Then Never Again… One-Time UI in Angular

Show It Once, Then Never Again… One-Time UI in Angular

May 29, 2025

One-time UI elements like onboarding banners and tooltips need to remember their dismissed state across page reloads, but managing this with component state loses persistence. LocalStorage provides persistent storage that survives browser sessions, while Angular signals enable reactive state management. This tutorial demonstrates how to build a reusable structural directive that combines localStorage persistence with signal-based reactivity, creating a one-time UI pattern you can use anywhere in your Angular application.

exportAs in Angular: What It Does and When to Use It

exportAs in Angular: What It Does and When to Use It

May 22, 2025

Directives with public methods or signals need a way to expose their API to parent components, but accessing directive instances from templates requires explicit references. Angular's exportAs property lets you create template references to directives, enabling access to their methods, signals, and properties directly in templates. This tutorial demonstrates how to use exportAs to create reusable directives with clean, declarative APIs, following patterns used by Angular Material components.

You Might Not Need That Service After All 💉

You Might Not Need That Service After All 💉

May 15, 2025

Component communication in Angular often requires prop drilling with inputs/outputs or global services, creating tight coupling and maintenance headaches. Angular's dependency injection system allows you to inject parent or grandparent components directly, eliminating the need for intermediate props or shared services. This tutorial demonstrates how to use component injection to access parent component APIs, share context across component hierarchies, and simplify component communication patterns.

Nobody Wants to See a Blank Screen… Build Smarter Loaders!

Nobody Wants to See a Blank Screen… Build Smarter Loaders!

May 08, 2025

Blank screens and generic spinners create poor user experiences, making apps feel slow even when they're loading quickly. Skeleton loaders improve perceived performance by showing UI structure immediately, providing visual feedback, and creating smooth transitions to real content. This tutorial demonstrates how to build skeleton loaders using Angular's deferred loading, signals for state management, and animations for smooth transitions. Note: This uses Angular's deprecated animations module—modern alternatives are available.

Still Using ControlValueAccessor? It Might Be Overkill 🤷

Still Using ControlValueAccessor? It Might Be Overkill 🤷

May 01, 2025

ControlValueAccessor requires multiple interface methods, providers, and boilerplate code, making simple custom form controls unnecessarily complex. Modern Angular provides simpler alternatives using signal inputs and direct FormControl bindings, eliminating the need for ControlValueAccessor in many cases. This tutorial demonstrates how to build custom form controls without ControlValueAccessor, reducing code complexity while maintaining full form integration and validation support.

Toast Notifications in Angular? Easier Than You Think!

Toast Notifications in Angular? Easier Than You Think!

April 24, 2025

Toast notifications provide user feedback for actions, errors, and system messages, but building them from scratch requires overlay management, positioning, and animation coordination. Angular Material's Snackbar service handles all of this complexity, providing a simple API for displaying toast notifications with actions, custom durations, and styling. This tutorial demonstrates how to implement toast notifications using Angular Material, including advanced patterns like triggering overlays from snackbar actions.

How to Build a Resizable Sidebar in Angular (Step-by-Step)

How to Build a Resizable Sidebar in Angular (Step-by-Step)

April 17, 2025

Resizable sidebars improve UX by letting users customize layouts, but implementing drag-to-resize functionality requires handling mouse events, calculating dimensions, and managing state. The Angular CDK Drag and Drop module simplifies this by providing built-in drag handling, boundary detection, and state management. This tutorial demonstrates how to build a resizable sidebar using only the Angular CDK, creating a professional drag-to-resize experience without external libraries.

How Angular Components Should Communicate in 2025

How Angular Components Should Communicate in 2025

April 10, 2025

Component communication in Angular has evolved from traditional inputs/outputs to modern two-way binding with model inputs, reducing boilerplate and simplifying parent-child data flow. This tutorial demonstrates three component communication patterns: one-way data flow with inputs/outputs, two-way binding with model inputs, and when to use each approach. You'll learn how to implement real-time communication between parent and child components using modern Angular patterns.

The Easiest Way to Add a Modal in Angular

The Easiest Way to Add a Modal in Angular

April 03, 2025

Building modals in Angular often requires third-party libraries or complex overlay code, but the Angular CDK Dialog provides a native, lightweight solution that handles positioning, focus management, and backdrop behavior automatically. This tutorial demonstrates how to create modals using the CDK Dialog service, open any component as a modal, customize styling, and add custom behavior without external dependencies. You'll learn the simplest way to add professional modals to your Angular applications.

Angular Directive Composition API: Enhance Components with Host Directives (v19+)

Angular Directive Composition API: Enhance Components with Host Directives (v19+)

March 27, 2025

Applying multiple directives to components creates verbose templates and makes it easy to forget required directives. Angular's Directive Composition API lets you embed directives directly into components, creating reusable component behaviors that can't be accidentally omitted. This tutorial demonstrates how to use host directives to add functionality like auto-focus, click-outside detection, and accessibility features directly into components, reducing template complexity and improving maintainability.

Angular Reactive Forms: Build Dynamic Checkbox Lists

Angular Reactive Forms: Build Dynamic Checkbox Lists

March 20, 2025

Dynamic checkbox lists are common in Angular forms, but building them with proper state management and "Select All" functionality requires understanding Reactive Forms patterns. This tutorial shows you how to generate checkbox controls dynamically from data, track selected values reactively, and implement a master "Select All" checkbox that toggles all items at once. You'll learn how to handle form state, validation, and user interactions efficiently.