Angular Components

I Deleted Half My Code When I Switched to Signal Forms

I Deleted Half My Code When I Switched to Signal Forms

October 23, 2025

Building custom form controls with ControlValueAccessor requires multiple methods, providers, and boilerplate code, making simple controls unnecessarily complex. Angular's Signal Forms API simplifies custom controls dramatically, reducing code by up to 50% while improving type safety and reactivity. This tutorial demonstrates how to migrate a custom control from ControlValueAccessor to Signal Forms, showing how the new API eliminates boilerplate and simplifies form control development.

Make Any List Draggable in Minutes

Make Any List Draggable in Minutes

October 09, 2025

Drag-to-reorder functionality improves UX by letting users customize list order, but implementing it requires handling drag events, calculating drop positions, and managing list state. The Angular CDK Drag and Drop module simplifies this with directives that handle all drag complexity, including visual feedback, drop zones, and reordering logic. This tutorial demonstrates how to add drag-to-reorder functionality to any Angular list using the CDK Drag and Drop module, requiring minimal code and no external libraries.

Animation Start/Done? Dead. Long Live CSS + DOM Events

Animation Start/Done? Dead. Long Live CSS + DOM Events

October 02, 2025

Angular's deprecated animations module provided start and done events for coordinating animations with component logic, but modern Angular requires a different approach. This tutorial demonstrates how to replace animation start/done events using pure CSS keyframes, Angular signals, and standard DOM events. You'll learn how to detect animation completion, coordinate multiple animations, and trigger side effects when animations finish, all without the deprecated module.

Make Any List Keyboard-Friendly in Minutes

Make Any List Keyboard-Friendly in Minutes

September 25, 2025

Keyboard navigation in lists requires handling arrow keys, home/end keys, type-ahead search, and focus management, but implementing this manually is complex and error-prone. The Angular CDK ListKeyManager provides a complete solution for keyboard-accessible lists, handling all navigation patterns automatically. This tutorial demonstrates how to use ListKeyManager to make any list keyboard-friendly, ensuring your Angular applications are accessible to all users without manual keyboard event handling.

Teleport a Component in Angular (and Keep Its State)

Teleport a Component in Angular (and Keep Its State)

September 18, 2025

Moving components to different DOM locations in Angular typically destroys component state because Angular recreates views when templates change. The Angular CDK DomPortal provides a solution by moving live DOM elements without destroying component instances, preserving state, event listeners, and component lifecycle. This tutorial compares three approaches: ng-template with ngTemplateOutlet, CDK Template Portal, and CDK DomPortal, showing when each preserves state and when components get recreated.

Can You Even Use Jump Links in Angular? (Yes… Here’s How)

Can You Even Use Jump Links in Angular? (Yes… Here’s How)

September 11, 2025

Jump links improve navigation in long-form content, but Angular's routing system breaks standard HTML anchor links. Implementing jump links in Angular requires handling router navigation, smooth scrolling, and ensuring links work across different route configurations. This tutorial demonstrates how to create router-friendly jump links that work seamlessly with Angular's routing system, providing smooth scrolling and proper navigation handling.

Modern Angular Animations: Ditch the DSL, Keep the Power

Modern Angular Animations: Ditch the DSL, Keep the Power

September 04, 2025

Angular's deprecated animations module leaves developers wondering how to create advanced animations without the DSL. The modern approach combines Angular's new enter/leave animation primitives with pure CSS animations, providing better performance, hardware acceleration, and simpler code. This tutorial demonstrates how to build complex animations including staggered list animations, sequential effects, and coordinated multi-element transitions using modern Angular animation techniques.

The Many Personalities of Angular’s viewChild (the Read Parameter)

The Many Personalities of Angular’s viewChild (the Read Parameter)

August 28, 2025

Angular's viewChild() signal query is powerful, but the read parameter unlocks advanced scenarios most developers never discover. Instead of just querying components and elements, you can read specific tokens, directives, or providers, accessing lower-level APIs and creating more flexible component architectures. This tutorial demonstrates how to use the read parameter to query ElementRef, ViewContainerRef, TemplateRef, and custom tokens, showing real-world examples that simplify component code.

Tired of Console Logs? Meet Angular’s Signal Graph

Tired of Console Logs? Meet Angular’s Signal Graph

August 21, 2025

Debugging signal dependencies in Angular applications is challenging without visibility into signal relationships and update chains. Angular 20.1 introduced the Signal Graph debugging tool, providing visual representation of signal dependencies, update flows, and reactive relationships. This tutorial demonstrates how to install and use the Signal Graph to understand your application's reactive architecture, debug signal issues, and optimize signal-based code.

I Built the Smoothest Countdown Timer in Angular

I Built the Smoothest Countdown Timer in Angular

August 14, 2025

Session timeout warnings prevent users from losing unsaved work by providing clear countdown feedback before automatic logout. Building effective session timers requires real-time countdown logic, visual feedback with animations, and color-coded warnings that escalate as time runs out. This tutorial demonstrates how to build a session timer component in Angular with smooth animations, progressive visual warnings, and clear messaging that keeps users informed.

Switch Between Grid & List Views in Angular: Easy & Flexible

Switch Between Grid & List Views in Angular: Easy & Flexible

August 07, 2025

Grid/list view toggles improve UX by letting users choose their preferred content layout, but building flexible toggle components requires managing state, coordinating CSS classes or component trees, and handling both internal and external state management. This tutorial demonstrates how to build a reusable view mode toggle component in Angular that can switch between CSS classes or completely different component structures, supporting both self-contained and parent-controlled state patterns.

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.

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.