angular-ui-patterns

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

1|Updated Aug 17, 2025
One-click install
npx skills add https://github.com/ratnesh-maurya/mdconverter --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/mdconverter/tree/main/.claude/skills/angular-ui-patterns
Command: npx skills add https://github.com/ratnesh-maurya/mdconverter --skill angular-ui-patterns-ratnesh-maurya

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Angular developers often ship components that flash stale spinners over existing data, silently swallow errors, or leave buttons clickable during submissions, producing confusing user experiences. This Skill provides decision trees, code patterns, and anti-patterns so every component handles loading, error, and empty states correctly. ## Core Features & Use Cases - Loading State Patterns: Decision trees and skeleton-vs-spinner guidance so loading indicators appear only when no data exists. - Error Handling Hierarchy: Inline errors, toasts, banners, and full error screens with a strict rule to never swallow errors silently. - Control Flow & Progressive Disclosure: Correct usage of @if, @for with track, @empty blocks, and @defer for lazy rendering of non-critical content. - Use Case: When building an item list page, apply the template pattern that shows an error state with retry, a skeleton only on first load, an empty state with a create action, and the data list otherwise. ## Quick Start Use the angular-ui-patterns skill to review my item list component and fix its loading, error, and empty state handling.

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 loading is true and no data exists yet, using @if (loading() && !items().length). This prevents spinner flashes over existing data during refetches and keeps the UI stable.

When should I use skeleton screens vs spinners in Angular?

Use skeletons when the content shape is known, such as lists, cards, 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?

@defer lazily renders a block when a trigger like viewport intersection fires, with @placeholder, @loading, and @error sub-blocks for each phase. It is ideal for non-critical content like comments below the fold.

Why should buttons be disabled during async operations in Angular?

Disabling buttons during submissions prevents duplicate requests from repeated clicks. Combine the disabled binding with a signal like saving() and show an inline spinner so users get clear feedback that the action is in progress.

What is the correct way to show empty states in Angular lists?

Use the @empty block inside @for to render an empty state when the collection has no items. Include an icon, title, description, and an action button so users know how to create their first item.