Ionic + Angular App Guidelines
This is a SKILL file, NOT a project. Never run npm install here. When creating a new project, ask for the project path or scaffold in a separate directory (e.g. ~/Projects/<app>).
When to consult these references
Project setup:
- Create a new Angular Ionic project: new-app.md
- Project structure (folder layout): project-structure.md
- App configuration (
main.ts, app.config.ts): app-config.md
- Routing (lazy
loadComponent, tabs): routing.md
Pages and navigation:
- Onboarding guard (
CanMatchFn — preferred over CanActivateFn for lazy-route gates): onboarding-guard.md
- Onboarding page (video background + Swiper): onboarding-page.md
- Paywall page (RevenueCat): paywall-page.md
- Tabs navigation: tabs-navigation.md
- Settings page: settings-page.md
Cross-cutting:
- Signals (
signal, computed, effect, untracked, signal inputs/outputs): signals.md
- Services (Theme / Onboarding / Ads / Purchases / Notifications): services.md
- Built-in control flow (
@if / @for / @switch): control-flow.md
- Accessibility (ARIA, touch targets, screen readers): accessibility.md
@defer lazy rendering (paywall / onboarding heavy chunks): defer-loading.md
- i18n with
@ngx-translate/core: i18n-ngx-translate.md
- Best practices (standalone, separate files, signals-first,
OnPush, inject()): best-practices.md
- Commands (build / sync / open): commands.md
Native plugin topics live in ../ionic-shared/references/ — always link there for AdMob, RevenueCat, push notifications, storage, and theme:
Required pages (always create)
- Onboarding — swipe-based, fullscreen background video + gradient overlay.
- Paywall — RevenueCat (weekly / yearly), shown immediately after onboarding.
- Settings — language, theme, notifications, remove ads, reset onboarding.
Required navigation
Use ion-tabs + ion-tab-bar. Never build a custom tab bar or pull in a third-party tab library.
Required libraries
npm install \
@capacitor/preferences @capacitor/push-notifications \
@capacitor/splash-screen @capacitor/status-bar \
@revenuecat/purchases-capacitor @capacitor-community/admob \
@ngx-translate/core @ngx-translate/http-loader \
swiper
Hard rules (Angular-specific)
- ❌ NgModules for new pages/components — use standalone components.
- ❌
IonicModule in standalone components — import the individual components (IonContent, IonButton, …).
- ❌ Inline
template or styles in @Component — always use separate .html, .ts, .scss files via templateUrl and styleUrls.
- ❌
@angular/http (deprecated) — use @angular/common/http.
- ❌
any type — use real TypeScript types.
- ✅ Prefer Signals for reactive state —
signal(), computed(), effect(). Services should expose readonly signals where it makes sense — see signals.md. Stick to stable signal APIs; avoid Angular features marked "developer preview" / "experimental" (e.g. linkedSignal, resource, Signal Forms) until they graduate.
- ✅ Use signal inputs / outputs (
input(), input.required(), output()) for new components.
Before reporting done
npm install
npx ng build
npx cap sync
The build must complete without errors. cap sync is required after every web build before testing on native.
1---2name: ionic-angular3description: Build a production-ready Ionic Capacitor mobile app with Angular standalone components, lazy-loaded routes, services for cross-cutting concerns, and @ngx-translate/core for i18n. Trigger when the user wants to create an Ionic Angular app, scaffold pages (onboarding, paywall, tabs, settings), or wire RevenueCat / AdMob / push notifications into an Angular Ionic project.4license: MIT5---67# Ionic + Angular App Guidelines89> **This is a SKILL file, NOT a project.** Never run `npm install` here. When creating a new project, ask for the project path or scaffold in a separate directory (e.g. `~/Projects/<app>`).1011## When to consult these references1213Project setup:1415- **Create a new Angular Ionic project**: [new-app.md](references/new-app.md)16- **Project structure** (folder layout): [project-structure.md](references/project-structure.md)17- **App configuration** (`main.ts`, `app.config.ts`): [app-config.md](references/app-config.md)18- **Routing** (lazy `loadComponent`, tabs): [routing.md](references/routing.md)1920Pages and navigation:2122- **Onboarding guard** (`CanMatchFn` — preferred over `CanActivateFn` for lazy-route gates): [onboarding-guard.md](references/onboarding-guard.md)23- **Onboarding page** (video background + Swiper): [onboarding-page.md](references/onboarding-page.md)24- **Paywall page** (RevenueCat): [paywall-page.md](references/paywall-page.md)25- **Tabs navigation**: [tabs-navigation.md](references/tabs-navigation.md)26- **Settings page**: [settings-page.md](references/settings-page.md)2728Cross-cutting:2930- **Signals** (`signal`, `computed`, `effect`, `untracked`, signal inputs/outputs): [signals.md](references/signals.md)31- **Services** (Theme / Onboarding / Ads / Purchases / Notifications): [services.md](references/services.md)32- **Built-in control flow** (`@if` / `@for` / `@switch`): [control-flow.md](references/control-flow.md)33- **Accessibility** (ARIA, touch targets, screen readers): [accessibility.md](references/accessibility.md)34- **`@defer` lazy rendering** (paywall / onboarding heavy chunks): [defer-loading.md](references/defer-loading.md)35- **i18n with `@ngx-translate/core`**: [i18n-ngx-translate.md](references/i18n-ngx-translate.md)36- **Best practices** (standalone, separate files, signals-first, `OnPush`, `inject()`): [best-practices.md](references/best-practices.md)37- **Commands** (build / sync / open): [commands.md](references/commands.md)3839Native plugin topics live in `../ionic-shared/references/` — always link there for AdMob, RevenueCat, push notifications, storage, and theme:4041- [admob.md](../ionic-shared/references/admob.md)42- [revenuecat.md](../ionic-shared/references/revenuecat.md)43- [push-notifications.md](../ionic-shared/references/push-notifications.md)44- [storage.md](../ionic-shared/references/storage.md)45- [theming.md](../ionic-shared/references/theming.md)46- [localization-content.md](../ionic-shared/references/localization-content.md)4748## Required pages (always create)4950- **Onboarding** — swipe-based, fullscreen background video + gradient overlay.51- **Paywall** — RevenueCat (weekly / yearly), shown immediately after onboarding.52- **Settings** — language, theme, notifications, remove ads, reset onboarding.5354## Required navigation5556Use `ion-tabs` + `ion-tab-bar`. Never build a custom tab bar or pull in a third-party tab library.5758## Required libraries5960```bash61npm install \62 @capacitor/preferences @capacitor/push-notifications \63 @capacitor/splash-screen @capacitor/status-bar \64 @revenuecat/purchases-capacitor @capacitor-community/admob \65 @ngx-translate/core @ngx-translate/http-loader \66 swiper67```6869## Hard rules (Angular-specific)7071- ❌ NgModules for new pages/components — use **standalone** components.72- ❌ `IonicModule` in standalone components — import the individual components (`IonContent`, `IonButton`, …).73- ❌ Inline `template` or `styles` in `@Component` — always use **separate** `.html`, `.ts`, `.scss` files via `templateUrl` and `styleUrls`.74- ❌ `@angular/http` (deprecated) — use `@angular/common/http`.75- ❌ `any` type — use real TypeScript types.76- ✅ **Prefer Signals** for reactive state — `signal()`, `computed()`, `effect()`. Services should expose readonly signals where it makes sense — see [signals.md](references/signals.md). Stick to **stable** signal APIs; avoid Angular features marked "developer preview" / "experimental" (e.g. `linkedSignal`, `resource`, Signal Forms) until they graduate.77- ✅ Use **signal inputs / outputs** (`input()`, `input.required()`, `output()`) for new components.7879## Before reporting done8081```bash82npm install83npx ng build84npx cap sync85```8687The build must complete without errors. `cap sync` is required after every web build before testing on native.