Ionic angular

From capawesome-team/skills · View interactive version

Ionic angular is an AI agent skill from the GitHub repository capawesome-team/skills. Guides the agent through Angular-specific patterns for Ionic app development. Covers project structure, standalone vs NgModule architecture detection, Angular Router integration with Ionic navigation (tabs, side menu, modals), lazy loading, Ionic page lifecycle hooks, reactive forms with Ionic input

How to use this skill

Skill file

Ionic Angular

Ionic development with Angular — project structure, Angular-specific components, navigation, lazy loading, forms, and lifecycle integration.

Prerequisites

  1. Ionic Framework 7 or 8 with @ionic/angular.
  2. Angular 16+ (Angular 17+ recommended for standalone architecture).
  3. Node.js and npm installed.
  4. Ionic CLI installed (npm install -g @ionic/cli).

Agent Behavior

Procedures

Step 1: Analyze the Project

Auto-detect the following by reading project files — do not ask the user for information that can be inferred:

  1. Ionic version: Read @ionic/angular version from package.json.
  2. Angular version: Read @angular/core version from package.json.
  3. Architecture: Check src/main.ts for bootstrapApplication (standalone) or platformBrowserDynamic().bootstrapModule (NgModule). If src/app/app.module.ts exists and imports IonicModule, confirm NgModule.
  4. Capacitor: Check if @capacitor/core is in package.json. Check for android/ and ios/ directories.
  5. Routing: Check for src/app/app.routes.ts (standalone) or src/app/app-routing.module.ts (NgModule).
  6. Navigation pattern: Check src/app/ for a tabs/ directory (tab-based) or ion-menu usage in templates (side menu).

Step 2: Understand Project Structure

Read references/project-structure.md for the standard Ionic Angular directory layout.

Key points:

Step 3: Understand Architecture Differences

Read references/standalone-vs-ngmodules.md for detailed differences.

Summary:

| Aspect | Standalone | NgModule |

| ----------------- | ----------------------------------------------- | ------------------------------------------- |

| Bootstrap | bootstrapApplication in main.ts | platformBrowserDynamic().bootstrapModule |

| Ionic setup | provideIonicAngular({}) in app.config.ts | IonicModule.forRoot() in app.module.ts |

| Component imports | Import each Ionic component per file | IonicModule provides all globally |

| Import source | @ionic/angular/standalone | @ionic/angular |

| Lazy loading | loadComponent in routes | loadChildren in routes |

| Icon registration | addIcons() from ionicons required | Automatic |

| Tree-shaking | Yes | No |

Step 4: Set Up Navigation

Read references/navigation.md for full navigation patterns.

Topics covered:

Step 5: Implement Lifecycle Hooks

Read references/lifecycle.md for Ionic page lifecycle hook details.

Key rules:

Step 6: Build Forms

Read references/forms.md for form patterns with Ionic components.

Topics covered:

Step 7: Manage Services and State

Read references/services-and-state.md for service and state management patterns.

Topics covered:

Step 8: Optimize Performance

Read references/performance.md for performance optimization techniques.

Topics covered:

Step 9: Write Tests

Read references/testing.md for testing patterns.

Topics covered:

Error Handling

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.