diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ddd4feec2be..e00f7ba81a8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,6 +29,8 @@ jobs: run: npm run lint - name: Test run: npm run test + - name: 🧩 Typecheck + run: npm run typecheck - name: 🔤 Spell Check run: npm run spellcheck - uses: ./.github/workflows/actions/check-translations diff --git a/docs/angular/add-to-existing.md b/docs/angular/add-to-existing.mdx similarity index 92% rename from docs/angular/add-to-existing.md rename to docs/angular/add-to-existing.mdx index 8a551abfd4e..bf2ab3d2ef1 100644 --- a/docs/angular/add-to-existing.md +++ b/docs/angular/add-to-existing.mdx @@ -14,7 +14,7 @@ import DocsCards from '@components/global/DocsCards'; /> -This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](/docs/angular/quickstart.md) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](/docs/angular/overview.md). +This guide covers how to add Ionic Angular to an existing Angular project. If you're looking to start a new project from scratch, check out the [Ionic Angular Quickstart](/docs/angular/quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](/docs/angular/overview.mdx). :::tip @@ -76,7 +76,7 @@ Replace the existing `styles` array in `angular.json` with the following: :::info -While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.md). +While `core.css` is required, `normalize.css`, `structure.css`, and `typography.css` are recommended but not required. They normalize cross-browser differences, ensure proper scrolling behavior, and provide consistent typography and form styling. Without them, you may need to handle these concerns yourself. For more details, refer to [Global Stylesheets](/docs/layout/global-stylesheets.mdx). ::: @@ -96,7 +96,7 @@ export const appConfig: ApplicationConfig = { }; ``` -This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](/docs/angular/zoneless.md) for details. +This reflects the Angular 21 and 22 scaffold, which is zoneless by default. If your existing app is on Angular 18 through 20, it still has `provideZoneChangeDetection({ eventCoalescing: true })`; keep that provider and add `provideIonicAngular({})` alongside it. Refer to [Zoneless Change Detection](/docs/angular/zoneless.mdx) for details. ## Using Individual Components @@ -123,7 +123,7 @@ import { IonButton, IonDatetime } from '@ionic/angular'; export class App {} ``` -Visit the [components](/docs/components.md) page for all of the available Ionic components. +Visit the [components](/docs/components.mdx) page for all of the available Ionic components. ## Using Ionic Pages @@ -172,7 +172,7 @@ Replace the existing `styles` array in `angular.json` with the following: ] ``` -These stylesheets set up the overall page structure and provide [CSS utilities](/docs/layout/css-utilities.md) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/docs/layout/global-stylesheets.md). +These stylesheets set up the overall page structure and provide [CSS utilities](/docs/layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/docs/layout/global-stylesheets.mdx). #### 2. Set up Theming @@ -191,7 +191,7 @@ Create a `src/theme/variables.css` file with the following content: @import '@ionic/angular/css/palettes/dark.system.css'; ``` -This file enables [dark mode support](/docs/theming/dark-mode.md) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables. +This file enables [dark mode support](/docs/theming/dark-mode.mdx) for your Ionic app when the system is set to prefer a dark appearance. You can customize the theming behavior by uncommenting different dark palette imports or adding custom CSS variables. #### 3. Update the App Component diff --git a/docs/angular/build-options.md b/docs/angular/build-options.mdx similarity index 100% rename from docs/angular/build-options.md rename to docs/angular/build-options.mdx diff --git a/docs/angular/injection-tokens.md b/docs/angular/injection-tokens.mdx similarity index 100% rename from docs/angular/injection-tokens.md rename to docs/angular/injection-tokens.mdx diff --git a/docs/angular/lifecycle.md b/docs/angular/lifecycle.mdx similarity index 100% rename from docs/angular/lifecycle.md rename to docs/angular/lifecycle.mdx diff --git a/docs/angular/navigation.md b/docs/angular/navigation.mdx similarity index 99% rename from docs/angular/navigation.md rename to docs/angular/navigation.mdx index 1c1fba26650..4c35c726a7a 100644 --- a/docs/angular/navigation.md +++ b/docs/angular/navigation.mdx @@ -197,7 +197,7 @@ export class AppRoutingModule {} :::tip -If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to also import the `IonRouterLink` directive for Ionic components or the `IonRouterLinkWithHref` directive for `` elements. An example of this is available in the [Ionic Angular Build Options docs](./build-options.md#migrating-from-modules-to-standalone). +If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to also import the `IonRouterLink` directive for Ionic components or the `IonRouterLinkWithHref` directive for `` elements. An example of this is available in the [Ionic Angular Build Options docs](./build-options.mdx#migrating-from-modules-to-standalone). ::: diff --git a/docs/angular/overlays.md b/docs/angular/overlays.mdx similarity index 100% rename from docs/angular/overlays.md rename to docs/angular/overlays.mdx diff --git a/docs/angular/overview.md b/docs/angular/overview.mdx similarity index 100% rename from docs/angular/overview.md rename to docs/angular/overview.mdx diff --git a/docs/angular/performance.md b/docs/angular/performance.mdx similarity index 100% rename from docs/angular/performance.md rename to docs/angular/performance.mdx diff --git a/docs/angular/platform.md b/docs/angular/platform.mdx similarity index 100% rename from docs/angular/platform.md rename to docs/angular/platform.mdx diff --git a/docs/angular/pwa.md b/docs/angular/pwa.mdx similarity index 100% rename from docs/angular/pwa.md rename to docs/angular/pwa.mdx diff --git a/versioned_docs/version-v9/angular/quickstart.md b/docs/angular/quickstart.mdx similarity index 94% rename from versioned_docs/version-v9/angular/quickstart.md rename to docs/angular/quickstart.mdx index a060df0e171..4ba89d69358 100644 --- a/versioned_docs/version-v9/angular/quickstart.md +++ b/docs/angular/quickstart.mdx @@ -174,17 +174,17 @@ And the template, in the `home.page.html` file, uses those components: ``` -This creates a page with a header and scrollable content area. The second header shows a [collapsible large title](/docs/api/title.md#collapsible-large-titles) that displays on iOS devices when at the top of the content, then condenses to show the smaller title in the first header when scrolling down. +This creates a page with a header and scrollable content area. The second header shows a [collapsible large title](/docs/api/title.mdx#collapsible-large-titles) that displays on iOS devices when at the top of the content, then condenses to show the smaller title in the first header when scrolling down. :::tip[Learn More] -For detailed information about Ionic layout components, refer to the [Header](/docs/api/header.md), [Toolbar](/docs/api/toolbar.md), [Title](/docs/api/title.md), and [Content](/docs/api/content.md) documentation. +For detailed information about Ionic layout components, refer to the [Header](/docs/api/header.mdx), [Toolbar](/docs/api/toolbar.mdx), [Title](/docs/api/title.mdx), and [Content](/docs/api/content.mdx) documentation. ::: ## Add an Ionic Component -You can enhance your Home page with more Ionic UI components. For example, add a [Button](/docs/api/button.md) at the end of the `ion-content`: +You can enhance your Home page with more Ionic UI components. For example, add a [Button](/docs/api/button.mdx) at the end of the `ion-content`: ```html title="src/app/home/home.page.html" @@ -215,7 +215,7 @@ ionic generate page new A route will be automatically added to `app.routes.ts`. -In `new.page.html`, you can add a [Back Button](/docs/api/back-button.md) to the [Toolbar](/docs/api/toolbar.md): +In `new.page.html`, you can add a [Back Button](/docs/api/back-button.mdx) to the [Toolbar](/docs/api/toolbar.mdx): ```html title="src/app/new/new.page.html" @@ -262,7 +262,7 @@ import { RouterLink } from '@angular/router'; :::info -Navigating can also be performed using Angular's Router service. Refer to the [Angular Navigation documentation](/docs/angular/navigation.md#navigating-to-different-routes) for more information. +Navigating can also be performed using Angular's Router service. Refer to the [Angular Navigation documentation](/docs/angular/navigation.mdx#navigating-to-different-routes) for more information. ::: @@ -307,7 +307,7 @@ export class NewPage implements OnInit { Alternatively, you can register icons in `app.component.ts` to use them throughout your app. -For more information, refer to the [Icon documentation](/docs/api/icon.md) and the [Ionicons documentation](https://ionic.io/ionicons/). +For more information, refer to the [Icon documentation](/docs/api/icon.mdx) and the [Ionicons documentation](https://ionic.io/ionicons/). ## Call Component Methods @@ -393,7 +393,7 @@ To call methods on Ionic components: 1. Create a `ViewChild` reference for the component 2. Call the method directly on the component instance -You can find available methods for each component in the [Methods](/docs/api/content.md#methods) section of their API documentation. +You can find available methods for each component in the [Methods](/docs/api/content.mdx#methods) section of their API documentation. ## Run on a Device diff --git a/docs/angular/slides.md b/docs/angular/slides.mdx similarity index 100% rename from docs/angular/slides.md rename to docs/angular/slides.mdx diff --git a/docs/angular/storage.md b/docs/angular/storage.mdx similarity index 100% rename from docs/angular/storage.md rename to docs/angular/storage.mdx diff --git a/docs/angular/testing.md b/docs/angular/testing.mdx similarity index 100% rename from docs/angular/testing.md rename to docs/angular/testing.mdx diff --git a/docs/angular/virtual-scroll.md b/docs/angular/virtual-scroll.mdx similarity index 100% rename from docs/angular/virtual-scroll.md rename to docs/angular/virtual-scroll.mdx diff --git a/versioned_docs/version-v9/angular/your-first-app.md b/docs/angular/your-first-app.mdx similarity index 95% rename from versioned_docs/version-v9/angular/your-first-app.md rename to docs/angular/your-first-app.mdx index e59d85e9b69..a1e5363b11b 100644 --- a/versioned_docs/version-v9/angular/your-first-app.md +++ b/docs/angular/your-first-app.mdx @@ -26,7 +26,7 @@ Here’s the finished app running on all 3 platforms: :::note -Looking for the previous version of this guide that covered Ionic 4 and Cordova? Refer to the [Ionic 4 and Cordova guide](../developer-resources/guides/first-app-v4/intro.md). +Looking for the previous version of this guide that covered Ionic 4 and Cordova? Refer to the [Ionic 4 and Cordova guide](../developer-resources/guides/first-app-v4/intro.mdx). ::: @@ -36,7 +36,7 @@ We'll create a Photo Gallery app that offers the ability to take photos with you Highlights include: -- One Angular-based codebase that runs on the web, iOS, and Android using Ionic Framework [UI components](../components.md). +- One Angular-based codebase that runs on the web, iOS, and Android using Ionic Framework [UI components](../components.mdx). - Deployed as a native iOS and Android mobile app using [Capacitor](https://capacitorjs.com), Ionic's official native app runtime. - Photo Gallery functionality powered by the Capacitor [Camera](../native/camera.md), [Filesystem](../native/filesystem.md), and [Preferences](../native/preferences.md) APIs. @@ -70,7 +70,7 @@ npm install -g @ionic/cli native-run cordova-res The `-g` option means _install globally_. When packages are installed globally, `EACCES` permission errors can occur. -Consider setting up npm to operate globally without elevated permissions. Refer to [Resolving Permission Errors](../developing/tips.md#resolving-permission-errors) for more information. +Consider setting up npm to operate globally without elevated permissions. Refer to [Resolving Permission Errors](../developing/tips.mdx#resolving-permission-errors) for more information. ::: @@ -174,7 +174,7 @@ Open `/src/app/tab2/tab2.page.html`. It contains: ``` -`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](../api/title.md#collapsible-large-titles) support). Rename both `ion-title` elements to: +`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title (there are two of them due to iOS [Collapsible Large Title](../api/title.mdx#collapsible-large-titles) support). Rename both `ion-title` elements to: ```html @@ -196,7 +196,7 @@ Open `/src/app/tab2/tab2.page.html`. It contains: ``` -We put the visual aspects of our app into ``. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](../api/fab.md) (FAB) to the bottom of the page and set the camera image as the icon. +We put the visual aspects of our app into ``. In this case, it’s where we’ll add a button that opens the device’s camera as well as displays the image captured by the camera. Start by adding a [floating action button](../api/fab.mdx) (FAB) to the bottom of the page and set the camera image as the icon. ```html diff --git a/versioned_docs/version-v9/angular/your-first-app/2-taking-photos.md b/docs/angular/your-first-app/2-taking-photos.mdx similarity index 95% rename from versioned_docs/version-v9/angular/your-first-app/2-taking-photos.md rename to docs/angular/your-first-app/2-taking-photos.mdx index 3ce57cbd0b3..ee52853881c 100644 --- a/versioned_docs/version-v9/angular/your-first-app/2-taking-photos.md +++ b/docs/angular/your-first-app/2-taking-photos.mdx @@ -231,7 +231,7 @@ export interface UserPhoto { } ``` -Next, switch to `tab2.page.html` to display the images. We'll add a [Grid component](../../api/grid.md) so the photos display neatly as they're added to the gallery. Inside the grid, loop through each photo in the `PhotoService`'s `photos` signal with the built-in [`@for`](https://angular.dev/guide/templates/control-flow#for-block-repeaters) block - calling `photoService.photos()` reads the signal's current value. For each item, add an `` element and set its `src` property to the photo's path. +Next, switch to `tab2.page.html` to display the images. We'll add a [Grid component](../../api/grid.mdx) so the photos display neatly as they're added to the gallery. Inside the grid, loop through each photo in the `PhotoService`'s `photos` signal with the built-in [`@for`](https://angular.dev/guide/templates/control-flow#for-block-repeaters) block - calling `photoService.photos()` reads the signal's current value. For each item, add an `` element and set its `src` property to the photo's path. ```html diff --git a/docs/angular/your-first-app/3-saving-photos.md b/docs/angular/your-first-app/3-saving-photos.mdx similarity index 100% rename from docs/angular/your-first-app/3-saving-photos.md rename to docs/angular/your-first-app/3-saving-photos.mdx diff --git a/docs/angular/your-first-app/4-loading-photos.md b/docs/angular/your-first-app/4-loading-photos.mdx similarity index 100% rename from docs/angular/your-first-app/4-loading-photos.md rename to docs/angular/your-first-app/4-loading-photos.mdx diff --git a/docs/angular/your-first-app/5-adding-mobile.md b/docs/angular/your-first-app/5-adding-mobile.mdx similarity index 95% rename from docs/angular/your-first-app/5-adding-mobile.md rename to docs/angular/your-first-app/5-adding-mobile.mdx index 2ac9768a4b8..b3736d50de6 100644 --- a/docs/angular/your-first-app/5-adding-mobile.md +++ b/docs/angular/your-first-app/5-adding-mobile.mdx @@ -17,7 +17,7 @@ Our photo gallery app won’t be complete until it runs on iOS, Android, and the Let’s start with making some small code changes - then our app will “just work” when we deploy it to a device. -Import the Ionic [Platform API](../platform.md) into `photo.service.ts`, which is used to retrieve information about the current device. In this case, it’s useful for selecting which code to execute based on the platform the app is running on (web or mobile). +Import the Ionic [Platform API](../platform.mdx) into `photo.service.ts`, which is used to retrieve information about the current device. In this case, it’s useful for selecting which code to execute based on the platform the app is running on (web or mobile). Add `Platform` to the imports at the top of the file and a new property `platform` to the `PhotoService` class. We'll also need to update the constructor to set the user's platform. @@ -85,7 +85,7 @@ private async savePicture(photo: Photo) { } ``` -When running on mobile, set `filepath` to the result of the `writeFile()` operation - `savedFile.uri`. When setting the `webviewPath`, use the special `Capacitor.convertFileSrc()` method ([details on the File Protocol](../../core-concepts/webview.md#file-protocol)). To use this method, we'll need to import Capacitor into `photo.service.ts`. +When running on mobile, set `filepath` to the result of the `writeFile()` operation - `savedFile.uri`. When setting the `webviewPath`, use the special `Capacitor.convertFileSrc()` method ([details on the File Protocol](../../core-concepts/webview.mdx#file-protocol)). To use this method, we'll need to import Capacitor into `photo.service.ts`. ```ts import { Injectable, inject, signal } from '@angular/core'; diff --git a/docs/angular/your-first-app/6-deploying-mobile.md b/docs/angular/your-first-app/6-deploying-mobile.mdx similarity index 100% rename from docs/angular/your-first-app/6-deploying-mobile.md rename to docs/angular/your-first-app/6-deploying-mobile.mdx diff --git a/versioned_docs/version-v9/angular/your-first-app/7-live-reload.md b/docs/angular/your-first-app/7-live-reload.mdx similarity index 96% rename from versioned_docs/version-v9/angular/your-first-app/7-live-reload.md rename to docs/angular/your-first-app/7-live-reload.mdx index 2d3a9462cf8..c300e4730ac 100644 --- a/versioned_docs/version-v9/angular/your-first-app/7-live-reload.md +++ b/docs/angular/your-first-app/7-live-reload.mdx @@ -13,7 +13,7 @@ sidebar_label: Live Reload So far, we’ve learned how easy it is to develop a cross-platform app that works everywhere. The development experience is pretty quick, but what if I told you there was a way to go faster? -We can use the Ionic CLI’s [Live Reload functionality](../../cli/livereload.md) to boost our productivity when building Ionic apps. When active, Live Reload will reload the browser and/or WebView when changes in the app are detected. +We can use the Ionic CLI’s [Live Reload functionality](../../cli/livereload.mdx) to boost our productivity when building Ionic apps. When active, Live Reload will reload the browser and/or WebView when changes in the app are detected. ## Live Reload @@ -156,7 +156,7 @@ export class Tab2Page implements OnInit { } ``` -Open `tab2.page.html` and wrap each image in a `