angular-performance

Optimize Angular apps with NgOptimizedImage, @defer, lazy routes, and SSR.

19|2|Updated Apr 28, 2026
One-click install
npx skills add https://github.com/CamiloAndresGTRUniandes/lucy-ai --skill angular-performance-camiloandresgtruniandes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: angular-performance
Source: https://github.com/CamiloAndresGTRUniandes/lucy-ai/tree/main/skills/angular-performance
Command: npx skills add https://github.com/CamiloAndresGTRUniandes/lucy-ai --skill angular-performance-camiloandresgtruniandes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Angular performance issues like slow image loading, heavy bundles, and sluggish initial rendering cause poor user experience and weaker SEO. This Skill helps you apply modern Angular image optimization, lazy loading, and SSR/hydration patterns to reduce load time and runtime jank.

Core Features & Use Cases

  • Optimized images: Use NgOptimizedImage with correct sizing, ngSrc, priority for LCP, and safe fill behavior to improve rendering stability.
  • Lazy loading with @defer: Defer non-critical components using viewport/interaction/idle/timer/condition triggers with placeholders, loading states, and error handling.
  • Performance-friendly rendering: Choose SSR vs CSR/SSG based on page intent and avoid layout thrash by not triggering reflows/repaints in Angular lifecycle hooks.
  • Lazy routes: Load components and feature modules on demand to reduce initial bundle size and speed up navigation.

Quick Start

Apply NgOptimizedImage, convert heavy sections to @defer with an appropriate trigger, and use lazy-loaded routes for non-critical features in your Angular app.

Frequently Asked Questions about angular-performance

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

FAQPage Schema
How do I optimize images in Angular to improve initial rendering speed?

Optimize Angular images by using NgOptimizedImage with ngSrc, correct dimensions, and priority for LCP elements. This reduces slow initial rendering and improves loading stability for image-heavy UIs.

What is the best way to lazy load non-critical components in Angular?

The best way to lazy load Angular components is using @defer with viewport, interaction, idle, or timer triggers. This defers non-critical feature areas while providing placeholder, loading, and error states to reduce initial bundle size.

How does Angular SSR and hydration affect SEO and startup time?

Angular SSR and hydration improve SEO and startup time by rendering pages on the server before client hydration. Selecting appropriate SSR or SSG strategies based on page intent reduces sluggish initial rendering and improves search indexing.

Why does my Angular app have runtime jank and layout thrash?

Angular runtime jank and layout thrash occur when reflows and repaints are triggered inside lifecycle hooks. Avoid manipulating DOM layout during these events and use lazy routes to keep performance-friendly rendering stable.

Can I use lazy routes to reduce my Angular bundle size?

Yes, you can use lazy routes to reduce Angular initial bundle size. Loading components and feature modules on demand speeds up navigation and ensures heavy feature areas only load when accessed.

When should I use @defer triggers instead of standard component loading?

Use @defer triggers instead of standard loading for heavy feature areas that should load on demand. Triggers like viewport, interaction, idle, or condition delay rendering until necessary, reducing initial load overhead.