skills/ionic-angular/SKILL.md
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 components, Angular services for state management, route guards, performance optimization, and testing. Do not use for creating a new Ionic app from scratch, upgrading Ionic versions, general Ionic component usage unrelated to Angular, Capacitor plugin integration, or non-Angular frameworks (React, Vue).
npx skillsauth add capawesome-team/skills ionic-angularInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ionic development with Angular — project structure, Angular-specific components, navigation, lazy loading, forms, and lifecycle integration.
@ionic/angular.npm install -g @ionic/cli).src/main.ts for bootstrapApplication (standalone) vs. platformBrowserDynamic().bootstrapModule (NgModule). Adapt all code examples to the detected architecture.@ionic/angular/standalone. For NgModule components, import IonicModule in the page module.Auto-detect the following by reading project files — do not ask the user for information that can be inferred:
@ionic/angular version from package.json.@angular/core version from package.json.src/main.ts for bootstrapApplication (standalone) or platformBrowserDynamic().bootstrapModule (NgModule). If src/app/app.module.ts exists and imports IonicModule, confirm NgModule.@capacitor/core is in package.json. Check for android/ and ios/ directories.src/app/app.routes.ts (standalone) or src/app/app-routing.module.ts (NgModule).src/app/ for a tabs/ directory (tab-based) or ion-menu usage in templates (side menu).Read references/project-structure.md for the standard Ionic Angular directory layout.
Key points:
app.config.ts, app.routes.ts, and standalone page components.app.module.ts, app-routing.module.ts, and per-page *.module.ts files.ionic.config.json.src/theme/variables.scss.src/global.scss.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 |
Read references/navigation.md for full navigation patterns.
Topics covered:
<ion-app> with <ion-router-outlet>.routerLink with routerDirection for transition animations.NavController (navigateForward, navigateBack, navigateRoot, back).ActivatedRoute.<ion-tabs> with child routes per tab.<ion-menu> with <ion-menu-toggle> and child routes.CanActivateFn.ModalController for overlay navigation with data passing.Read references/lifecycle.md for Ionic page lifecycle hook details.
Key rules:
ngOnInit fires once (first creation). Use for one-time setup.ionViewWillEnter fires on every page visit. Use for refreshing data.ionViewDidEnter fires after the transition animation. Use for heavy work that would block animations.ionViewWillLeave fires before leaving. Use for cleanup, pausing subscriptions.ngOnDestroy fires when the page is popped from the navigation stack. Use for final cleanup.ViewWillEnter, ViewDidEnter, ViewWillLeave, ViewDidLeave from @ionic/angular.Read references/forms.md for form patterns with Ionic components.
Topics covered:
FormBuilder, FormGroup, Validators with Ionic input components.[(ngModel)] with FormsModule.ion-input, ion-textarea, ion-select, ion-checkbox, ion-toggle, ion-radio-group, ion-range, ion-datetime.errorText (Ionic 7+) or manual <ion-note> for older versions.labelPlacement attribute (floating, stacked, fixed).Read references/services-and-state.md for service and state management patterns.
Topics covered:
@Injectable({ providedIn: 'root' }).HttpClient setup for standalone and NgModule, CRUD service pattern.BehaviorSubject for shared observable state.signal() and computed() for reactive state (Angular 16+).LoadingController for async operations.ToastController for user-facing error/success messages.environment.ts / environment.prod.ts for API URLs.Read references/performance.md for performance optimization techniques.
Topics covered:
loadComponent (standalone) and loadChildren (NgModule).*ngFor and @for.cdk-virtual-scroll-viewport for large lists.PreloadAllModules for instant subsequent navigation.ion-skeleton-text for perceived performance during loading.Read references/testing.md for testing patterns.
Topics covered:
TestBed setup for standalone and NgModule pages.HttpTestingController.jasmine.createSpyObj for service and controller mocks.NavController.TestBed.runInInjectionContext for functional guards.NullInjectorError: No provider for IonRouterOutlet: In standalone apps, verify provideIonicAngular({}) is called in app.config.ts. In NgModule apps, verify IonicModule.forRoot() is imported in app.module.ts.@ionic/angular/standalone and listed in the imports array. In NgModule components, verify IonicModule is imported in the page module.addIcons() is called with the required icons from ionicons/icons, and IonIcon is imported from @ionic/angular/standalone.ionViewWillEnter not firing: Verify the component is directly routed via <ion-router-outlet>. Child components do not receive Ionic lifecycle events.ionViewWillEnter instead of ngOnInit for data loading. Ionic caches pages in the DOM, so ngOnInit only fires once.errorText on <ion-input>. For older versions, manually check control.invalid && control.touched and show <ion-note>.routerLink not working on Ionic components: In standalone components, import RouterLink from @angular/router in the component's imports array.NavController from @ionic/angular instead of Angular's Router for animated navigation. Alternatively, add routerDirection to routerLink elements.tab attribute on <ion-tab-button> matches the child route path. Do not programmatically navigate between tabs.capacitor-angular — Capacitor-specific Angular patterns (plugin services, NgZone, deep links, platform detection).ionic-app-development — General Ionic development (components, theming, CLI).ionic-app-creation — Create a new Ionic app from scratch.ionic-app-upgrades — Upgrade Ionic to a newer version.tools
Guides the agent through migrating Capacitor apps from discontinued Ionic Enterprise SDK plugins (Auth Connect, Identity Vault, Secure Storage) to their Capawesome alternatives (OAuth, Vault, Biometrics, Secure Preferences, SQLite). Covers dependency detection, side-by-side API mapping, code replacement, and platform-specific configuration for each plugin pair. Do not use for migrating Capacitor apps or plugins to a newer version, setting up Capawesome Cloud, or non-Capacitor mobile frameworks.
tools
Guides the agent through installing, configuring, and using Capacitor plugins from six sources — official Capacitor plugins, Capawesome plugins, Capacitor Community plugins, Capacitor Firebase plugins, Capacitor MLKit plugins, and RevenueCat plugins. Covers installation, platform-specific configuration (Android and iOS), and basic usage examples. Do not use for migrating Capacitor apps or plugins to a newer version, setting up Capacitor Live Updates, or non-Capacitor mobile frameworks.
tools
Guides the agent through Ionic Vue development patterns — project structure, Vue-specific Ionic components (IonPage, IonRouterOutlet, IonTabs), navigation with Vue Router and useIonRouter, Ionic lifecycle hooks (onIonViewWillEnter, onIonViewDidEnter, onIonViewWillLeave, onIonViewDidLeave), composable utilities (useIonRouter, useBackButton, useKeyboard), tab-based routing, lazy loading, platform detection with isPlatform, and troubleshooting common Vue-specific issues. Do not use for general Ionic component theming or CLI usage (use ionic-app-development), creating a new Ionic app (use ionic-app-creation), Capacitor-specific Vue patterns without Ionic (use capacitor-vue), upgrading Ionic versions (use ionic-app-upgrades), or non-Vue frameworks like Angular or React.
development
Guides the agent through Ionic Framework development with React — project structure, React-specific Ionic components, IonReactRouter and navigation patterns, Ionic lifecycle hooks (useIonViewWillEnter, useIonViewDidEnter, useIonViewWillLeave, useIonViewDidLeave), state management integration, and React-specific best practices for Ionic apps. Do not use for plain Capacitor React apps without Ionic (use capacitor-react), Ionic with Angular or Vue, creating a new Ionic app (use ionic-app-creation), upgrading Ionic to a newer version (use ionic-app-upgrades), or general Ionic component usage without React-specific context (use ionic-app-development).