angular-ui-patterns

Implement Angular UI patterns for loading states, error handling, and data display.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com --skill angular-ui-patterns-ratnesh-maurya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: angular-ui-patterns
Source: https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com/tree/main/.claude/skills/angular-ui-patterns
Command: npx skills add https://github.com/ratnesh-maurya/tracker.ratnesh-maurya.com --skill angular-ui-patterns-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Angular developers often ship components that flash stale UI, swallow errors silently, or allow duplicate form submissions, leading to confusing user experiences and hard-to-debug state bugs. ## Core Features & Use Cases - Loading State Patterns: Decision trees for choosing skeletons vs spinners and showing loading indicators only when no data exists. - Error Handling & Empty States: Error hierarchy guidance (inline, toast, banner, full screen) plus required empty states for every collection using @empty blocks. - Form, Button & Dialog Patterns: Submission state management, disabled buttons during async operations, and confirmation dialog lifecycles. - Use Case: When building a new item list component, apply the @if/@else control flow pattern to render error, skeleton, empty, and data states correctly, and use @defer to lazy-load non-critical sections like comments. ## Quick Start Ask the AI to build an Angular list component following the angular-ui-patterns loading, error, and empty state rules.

Frequently Asked Questions about angular-ui-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle loading states in Angular components?▼

Show a loading indicator only when there is no data to display, using the pattern `@else if (loading() && !items().length)`. This prevents spinner flashes when refetching data that is already rendered on screen.

When should I use skeleton vs spinner in Angular?▼

Use skeletons when the content shape is known, such as list or card layouts and initial page loads. Use spinners for unknown content shapes, modal actions, button submissions, and inline operations.

How does Angular @defer work for lazy loading content?▼

The `@defer` block renders non-critical content lazily, triggered by conditions like `on viewport`. It supports `@placeholder`, `@loading` with minimum durations, and `@error` fallback blocks for graceful progressive disclosure.

How do I show empty states with Angular @for?▼

Use the `@empty` block inside `@for` loops to render an empty state component when the collection has no items. Every list should include an empty state with an icon, title, description, and optional action button.

Why should buttons be disabled during async operations?▼

Disabling buttons during async operations prevents duplicate submissions from repeated clicks. Combine the disabled binding with a loading spinner and a signal flag that resets in a finally block after the operation completes.

What is the correct error handling hierarchy for Angular apps?▼

Use inline errors for field-level validation, toast notifications for recoverable errors, error banners for page-level issues with partially usable data, and full error screens for unrecoverable failures. Never catch errors silently without user feedback.