Ionic Angularのロゴ

Ionic Angular

組織
capawesome-team
ionic-angular

Ionicアプリ開発におけるAngular固有のパターンをAIエージェントに案内します。プロジェクト構成、standaloneとNgModuleのアーキテクチャ判定、Ionicナビゲーション(タブ、サイドメニュー、モーダル)とAngular Routerの連携、遅延読み込み、Ionicのページライフサイクルフック、Ionic入力コンポーネントを使ったリアクティブフォーム、状態管理用のAngularサービス、ルートガード、パフォーマンス最適化、テストを扱います。Ionicアプリの新規作成、Ionicのバージョンアップ、Angularと無関係な一般的なIonicコンポーネントの使用、Capacitorプラグインの連携、Angular以外のフレームワーク(React、Vue)には使用しないでください。

Add to TypingMind

概要

公開者capawesome-team
リポジトリskills
スキル名ionic-angular
スター
54
フォーク
1
同梱ファイル
8
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 8個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    capawesome-teamがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Ionic Angular」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/capawesome-team/skills/tree/main/skills/ionic-angular
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/capawesome-team/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/ionic-angular .claude/skills/ionic-angular
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでIonic Angularを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にIonic Angularを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Ionic Angularは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

  • Auto-detect architecture. Check src/main.ts for bootstrapApplication (standalone) vs. platformBrowserDynamic().bootstrapModule (NgModule). Adapt all code examples to the detected architecture.
  • Guide step-by-step. Walk the user through one topic at a time.
  • Adapt imports. For standalone components, import each Ionic component from @ionic/angular/standalone. For NgModule components, import IonicModule in the page module.

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:

  • Standalone projects have app.config.ts, app.routes.ts, and standalone page components.
  • NgModule projects have app.module.ts, app-routing.module.ts, and per-page *.module.ts files.
  • Ionic config lives in ionic.config.json.
  • Theme variables are in src/theme/variables.scss.
  • Global styles and Ionic CSS imports are in src/global.scss.

Step 3: Understand Architecture Differences

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

Summary:

AspectStandaloneNgModule
BootstrapbootstrapApplication in main.tsplatformBrowserDynamic().bootstrapModule
Ionic setupprovideIonicAngular({}) in app.config.tsIonicModule.forRoot() in app.module.ts
Component importsImport each Ionic component per fileIonicModule provides all globally
Import source@ionic/angular/standalone@ionic/angular
Lazy loadingloadComponent in routesloadChildren in routes
Icon registrationaddIcons() from ionicons requiredAutomatic
Tree-shakingYesNo

Step 4: Set Up Navigation

Read references/navigation.md for full navigation patterns.

Topics covered:

  • Route configuration — defining routes with lazy loading for both architectures.
  • Root component layout — <ion-app> with <ion-router-outlet>.
  • Template navigation — routerLink with routerDirection for transition animations.
  • Programmatic navigation — NavController (navigateForward, navigateBack, navigateRoot, back).
  • Route parameters — reading params via ActivatedRoute.
  • Tab navigation — <ion-tabs> with child routes per tab.
  • Side menu — <ion-menu> with <ion-menu-toggle> and child routes.
  • Route guards — functional guards (Angular 15.2+) with CanActivateFn.
  • Modals — ModalController for overlay navigation with data passing.
  • Linear vs. non-linear routing — when to use each pattern.

Step 5: Implement Lifecycle Hooks

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.
  • Implement interfaces ViewWillEnter, ViewDidEnter, ViewWillLeave, ViewDidLeave from @ionic/angular.

Step 6: Build Forms

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

Topics covered:

  • Reactive forms — FormBuilder, FormGroup, Validators with Ionic input components.
  • Template-driven forms — [(ngModel)] with FormsModule.
  • Ionic form components — ion-input, ion-textarea, ion-select, ion-checkbox, ion-toggle, ion-radio-group, ion-range, ion-datetime.
  • Validation display — errorText (Ionic 7+) or manual <ion-note> for older versions.
  • Label placement — labelPlacement attribute (floating, stacked, fixed).

Step 7: Manage Services and State

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

Topics covered:

  • Injectable services — @Injectable({ providedIn: 'root' }).
  • HTTP data fetching — HttpClient setup for standalone and NgModule, CRUD service pattern.
  • Reactive state — BehaviorSubject for shared observable state.
  • Angular signals — signal() and computed() for reactive state (Angular 16+).
  • Loading indicators — LoadingController for async operations.
  • Error feedback — ToastController for user-facing error/success messages.
  • Environment config — environment.ts / environment.prod.ts for API URLs.

Step 8: Optimize Performance

Read references/performance.md for performance optimization techniques.

Topics covered:

  • Lazy loading — loadComponent (standalone) and loadChildren (NgModule).
  • trackBy / track — efficient list rendering with *ngFor and @for.
  • Virtual scrolling — Angular CDK cdk-virtual-scroll-viewport for large lists.
  • OnPush change detection — reduce unnecessary re-renders.
  • Preloading strategy — PreloadAllModules for instant subsequent navigation.
  • Skeleton text — ion-skeleton-text for perceived performance during loading.

Step 9: Write Tests

Read references/testing.md for testing patterns.

Topics covered:

  • Unit testing pages — TestBed setup for standalone and NgModule pages.
  • Testing services — basic services and HTTP services with HttpTestingController.
  • Mocking dependencies — jasmine.createSpyObj for service and controller mocks.
  • Testing navigation — mocking NavController.
  • Testing guards — TestBed.runInInjectionContext for functional guards.
  • E2E testing — Cypress and Playwright setup.

Error Handling

  • 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 components not rendering: In standalone components, verify each Ionic component is imported from @ionic/angular/standalone and listed in the imports array. In NgModule components, verify IonicModule is imported in the page module.
  • Icons not showing (standalone): Verify 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.
  • Page data not refreshing on back navigation: Use ionViewWillEnter instead of ngOnInit for data loading. Ionic caches pages in the DOM, so ngOnInit only fires once.
  • Form validation errors not displaying: For Ionic 7+, use 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.
  • Page transitions not animating: Use NavController from @ionic/angular instead of Angular's Router for animated navigation. Alternatively, add routerDirection to routerLink elements.
  • Tab navigation broken: Verify the tab attribute on <ion-tab-button> matches the child route path. Do not programmatically navigate between tabs.

Related Skills

  • 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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Ionic Angular」では何ができますか?

Ionicアプリ開発におけるAngular固有のパターンをAIエージェントに案内します。プロジェクト構成、standaloneとNgModuleのアーキテクチャ判定、Ionicナビゲーション(タブ、サイドメニュー、モーダル)とAngular Routerの連携、遅延読み込み、Ionicのページライフサイクルフック、Ionic入力コンポーネントを使ったリアクティブフォーム、状態管理用のAngularサービス、ルートガード、パフォーマンス最適化、テストを扱います。Ionicアプリの新規作成、Ionicのバージョンアップ、Angularと無関係な一般的なIonicコンポーネントの使用、Capacitorプラグインの連携、Angular以外のフレームワーク(React、Vue)には使用しないでください。

TypingMindでIonic Angularを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Ionic Angularはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにIonic Angularをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/capawesome-team/skills/tree/main/skills/ionic-angularを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Ionic Angularを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Ionic Angularで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもIonic Angularを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Ionic Angular」は無料ですか?

はい。capawesome-teamがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇