Advanced Examples

September 17, 2025 Β· View on GitHub

This section contains advanced examples for Angular signals and related features.

#ExampleKey ConceptsDescriptionLive Demo
1Signal-based HTTP ResourceSignals, resource(), HTTP, error handlingModern HTTP data fetching with signalsπŸ”— Demo
2HTTP Caching with shareReplayRxJS shareReplay, HTTP caching, signals, refreshEfficient HTTP caching using RxJS shareReplay and signalsπŸ”— Demo
3ng-template: Real-World Use Casesng-template, context, outlets, custom directives, dynamic contentComprehensive demo of advanced ng-template patternsπŸ”— Demo
4Signal-based Disable Reactive FormSignals, reactive forms, custom directiveControl the disabled state of a reactive form using a signal and directiveπŸ”— Demo
5Auto-Save Form DirectiveSignals, reactive forms, throttle, LocalStorage, API, error handlingReusable directive for auto-saving form data with status and retriesπŸ”— Demo
6Directive Composition with hostDirectiveshostDirectives, Angular 17+, composition, standaloneCompose Tooltip and Highlight directives in a standalone componentπŸ”— Demo
7Track Angular PerformanceApplicationRef.tick, change detection, zoneless, manual tickTrack and visualize Angular’s change detection cycles in zoneless modeπŸ”— Demo
8Two-way Currency ConverterSignals, two-way binding, setter function, input, currency conversionLive USD ($) ↔ EUR (€) converter using signals and two-way bindingπŸ”— Demo
9Undo/Redo State ManagementSignals, undo/redo stack, form state, reactive UIImplement undo/redo stack for a form using Angular signalsπŸ”— Demo
10Collaborative List (Signals + Storage Event)Signals, storage event, RxJS, real-time syncReal-time collaborative list synced across tabs using signals and storage eventπŸ”— Demo
11Modal Service with ViewContainerRefModal, service, ViewContainerRef, dynamic componentOpen a modal using a service and ViewContainerRef. Demonstrates dynamic component creation and service-driven modals.πŸ”— Demo
12On-Demand Preloading via Service & Custom StrategyPreloadingStrategy, service, routing, signalsPreload modules only when triggered (e.g., on hover) using a service and custom PreloadingStrategyπŸ”— Demo
13Custom Toggle Form Control (ControlValueAccessor)ControlValueAccessor, forms, signals, reactive & template-driven, disabled stateFully reactive, typed, and form-friendly custom toggle control. Works with both reactive and template-driven forms, supports disabled state.πŸ”— Demo