Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ Use Markdown for links and headings whenever possible. When you need JSX, such a
- [`<Link>`](https://docusaurus.io/docs/docusaurus-core#link) from `@docusaurus/Link` instead of `<a>`. It handles the base URL and locale, and opens external URLs in a new tab with `rel="noopener noreferrer"`.
- [`<Heading>`](https://docusaurus.io/docs/api/misc/@docusaurus/eslint-plugin/prefer-docusaurus-heading) from `@theme/Heading` instead of `<h2>` to `<h6>`.

Link to another doc by its relative file path, with the extension, such as `[Accordion](./accordion.mdx)` or `[Config](../developing/config.mdx)`. Docusaurus resolves it to the page in the same version, the build fails if the file doesn't exist, and editors can follow it to the file. A JSX prop such as `href` skips that step, so use the URL path without `/docs` or an extension instead: `/api/accordion`, or `/v8/api/accordion` on a v8 page.

The build only checks links and anchors that go through Markdown or these components. A raw `<a href>` to a page that doesn't exist builds without errors, and a raw heading's `id` can't be used as a link target.

Markup inside code samples is exempt, since it's example code rather than part of the page. CI fails on a raw `<a>` or heading anywhere else. To check before pushing, run:
Expand Down
14 changes: 7 additions & 7 deletions docs/angular/add-to-existing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import DocsCards from '@components/global/DocsCards';
/>
</head>

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](/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](/angular/overview.mdx).
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](./quickstart.mdx) guide. For an overview of how Ionic Angular works with Angular, including version support and tooling, check out the [Ionic Angular Overview](./overview.mdx).

:::tip

Expand Down Expand Up @@ -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](/layout/global-stylesheets.mdx).
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](../layout/global-stylesheets.mdx).

:::

Expand All @@ -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](/angular/zoneless.mdx) 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](./zoneless.mdx) for details.

## Using Individual Components {/* #using-individual-components */}

Expand All @@ -123,7 +123,7 @@ import { IonButton, IonDatetime } from '@ionic/angular';
export class App {}
```

Visit the [components](/components.mdx) page for all of the available Ionic components.
Visit the [components](../components.mdx) page for all of the available Ionic components.

## Using Ionic Pages {/* #using-ionic-pages */}

Expand Down Expand Up @@ -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](/layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](/layout/global-stylesheets.mdx).
These stylesheets set up the overall page structure and provide [CSS utilities](../layout/css-utilities.mdx) for faster development. Some stylesheets are optional. For details on which stylesheets are required, check out [Global Stylesheets](../layout/global-stylesheets.mdx).

#### 2. Set up Theming {/* #2-set-up-theming */}

Expand All @@ -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](/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.
This file enables [dark mode support](../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 {/* #3-update-the-app-component */}

Expand Down Expand Up @@ -322,7 +322,7 @@ Now that you have Ionic Angular integrated into your project, check out:

<DocsCards>

<DocsCard header="Navigation" href="navigation" icon="/icons/component-navigation-icon.png">
<DocsCard header="Navigation" href="/angular/navigation" icon="/icons/component-navigation-icon.png">
<p>Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.</p>
</DocsCard>

Expand Down
4 changes: 2 additions & 2 deletions docs/angular/build-options.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ All Ionic imports should be imported from the `@ionic/angular` submodule. This i

**Bootstrapping and Configuration**

Ionic Angular needs to be configured when the Angular application calls `bootstrapApplication` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed.
Ionic Angular needs to be configured when the Angular application calls `bootstrapApplication` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config.mdx#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed.

```typescript title="main.ts"
import { enableProdMode, importProvidersFrom } from '@angular/core';
Expand Down Expand Up @@ -216,7 +216,7 @@ All Ionic imports should be imported from the `@ionic/angular` submodule. This i

**Bootstrapping and Configuration**

Ionic Angular needs to be configured in the `providers` array of `app.module.ts` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed.
Ionic Angular needs to be configured in the `providers` array of `app.module.ts` using the `provideIonicAngular` function. Developers can pass any [IonicConfig](../developing/config.mdx#ionicconfig) values as an object in this function. Note that `provideIonicAngular` needs to be called even if no custom config is passed.

```typescript title="app.module.ts"
import { NgModule } from '@angular/core';
Expand Down
2 changes: 1 addition & 1 deletion docs/angular/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ If your pages keep state in plain fields rather than signals, the component host

On **Angular 18 through 21** this only affects you if you set `OnPush` on those components yourself, because a component that does not declare a strategy is eager.

**Angular 22** makes `OnPush` the default for components that do not declare one, so refer to [Change detection on Angular 22](/angular/zoneless.mdx#change-detection-on-angular-22) for what your app shell has to declare.
**Angular 22** makes `OnPush` the default for components that do not declare one, so refer to [Change detection on Angular 22](./zoneless.mdx#change-detection-on-angular-22) for what your app shell has to declare.

:::

Expand Down
6 changes: 3 additions & 3 deletions docs/angular/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import DocsCards from '@components/global/DocsCards';

## Angular Version Support {/* #angular-version-support */}

Ionic Angular v9 supports Angular versions 18 through 22. For detailed information on supported versions and our support policy, refer to the [Ionic Angular Support Policy](/reference/support.mdx#ionic-angular).
Ionic Angular v9 supports Angular versions 18 through 22. For detailed information on supported versions and our support policy, refer to the [Ionic Angular Support Policy](../reference/support.mdx#ionic-angular).

## Angular Tooling {/* #angular-tooling */}

Expand All @@ -44,15 +44,15 @@ $ ionic serve █

<DocsCards>

<DocsCard header="Getting Started" href="quickstart" icon="/icons/guide-quickstart-icon.png">
<DocsCard header="Getting Started" href="/angular/quickstart" icon="/icons/guide-quickstart-icon.png">
<p>Quickly set up your first Ionic Angular app and learn the basics of the framework and CLI.</p>
</DocsCard>

<DocsCard header="Angular Documentation" href="https://angular.dev/overview" icon="/icons/logo-angular-icon.png">
<p>Learn more about Angular's core concepts, tools, and best practices from the official Angular documentation.</p>
</DocsCard>

<DocsCard header="Navigation" href="navigation" icon="/icons/component-navigation-icon.png">
<DocsCard header="Navigation" href="/angular/navigation" icon="/icons/component-navigation-icon.png">
<p>Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.</p>
</DocsCard>

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Below is a table listing all the possible platform values along with correspondi

#### Customizing Platform Detection Functions {/* #customizing-platform-detection-functions */}

The function used to detect a specific platform can be overridden by providing an alternative function in the global [Ionic config](../developing/config). Each function takes `window` as a parameter and returns a boolean.
The function used to detect a specific platform can be overridden by providing an alternative function in the global [Ionic config](../developing/config.mdx). Each function takes `window` as a parameter and returns a boolean.

<Tabs
groupId="framework"
Expand Down
22 changes: 11 additions & 11 deletions docs/angular/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import DocsCards from '@components/global/DocsCards';

Welcome! This guide will walk you through the basics of Ionic Angular development. You'll learn how to set up your development environment, generate a simple project, explore the project structure, and understand how Ionic components work. This is perfect for getting familiar with Ionic Angular before building your first real app.

If you're looking for a high-level overview of what Ionic Angular is and how it fits into the Angular ecosystem, refer to the [Ionic Angular Overview](overview).
If you're looking for a high-level overview of what Ionic Angular is and how it fits into the Angular ecosystem, refer to the [Ionic Angular Overview](./overview.mdx).

## Prerequisites {/* #prerequisites */}

Expand All @@ -31,7 +31,7 @@ If you don't have Node.js and npm, [download Node.js](https://nodejs.org/en/down

## Create a Project with the Ionic CLI {/* #create-a-project-with-the-ionic-cli */}

First, install the latest [Ionic CLI](../cli):
First, install the latest [Ionic CLI](../cli.mdx):

```shell
npm install -g @ionic/cli
Expand Down Expand Up @@ -173,17 +173,17 @@ And the template, in the `home.page.html` file, uses those components:
</ion-content>
```

This creates a page with a header and scrollable content area. The second header shows a [collapsible large title](/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.
This creates a page with a header and scrollable content area. The second header shows a [collapsible large title](../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](/api/header.mdx), [Toolbar](/api/toolbar.mdx), [Title](/api/title.mdx), and [Content](/api/content.mdx) documentation.
For detailed information about Ionic layout components, refer to the [Header](../api/header.mdx), [Toolbar](../api/toolbar.mdx), [Title](../api/title.mdx), and [Content](../api/content.mdx) documentation.

:::

## Add an Ionic Component {/* #add-an-ionic-component */}

You can enhance your Home page with more Ionic UI components. For example, add a [Button](/api/button.mdx) at the end of the `ion-content`:
You can enhance your Home page with more Ionic UI components. For example, add a [Button](../api/button.mdx) at the end of the `ion-content`:

```html title="src/app/home/home.page.html"
<ion-content>
Expand Down Expand Up @@ -214,7 +214,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](/api/back-button.mdx) to the [Toolbar](/api/toolbar.mdx):
In `new.page.html`, you can add a [Back Button](../api/back-button.mdx) to the [Toolbar](../api/toolbar.mdx):

```html title="src/app/new/new.page.html"
<ion-header [translucent]="true">
Expand Down Expand Up @@ -261,7 +261,7 @@ import { RouterLink } from '@angular/router';

:::info

Navigating can also be performed using Angular's Router service. Refer to the [Angular Navigation documentation](/angular/navigation.mdx#navigating-to-different-routes) for more information.
Navigating can also be performed using Angular's Router service. Refer to the [Angular Navigation documentation](./navigation.mdx#navigating-to-different-routes) for more information.

:::

Expand Down Expand Up @@ -306,7 +306,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](/api/icon.mdx) and the [Ionicons documentation](https://ionic.io/ionicons/).
For more information, refer to the [Icon documentation](../api/icon.mdx) and the [Ionicons documentation](https://ionic.io/ionicons/).

## Call Component Methods {/* #call-component-methods */}

Expand Down Expand Up @@ -392,7 +392,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](/api/content.mdx#methods) section of their API documentation.
You can find available methods for each component in the [Methods](../api/content.mdx#methods) section of their API documentation.

## Run on a Device {/* #run-on-a-device */}

Expand All @@ -419,15 +419,15 @@ This guide covered the basics of creating an Ionic Angular app, adding navigatio

<DocsCards>

<DocsCard header="Build Your First App" href="your-first-app" icon="/icons/component-content-icon.png">
<DocsCard header="Build Your First App" href="/angular/your-first-app" icon="/icons/component-content-icon.png">
<p>Build a real Photo Gallery app with Ionic Angular and native device features.</p>
</DocsCard>

<DocsCard header="Angular Documentation" href="https://angular.dev/overview" icon="/icons/logo-angular-icon.png">
<p>Learn more about Angular's core concepts, tools, and best practices from the official Angular documentation.</p>
</DocsCard>

<DocsCard header="Navigation" href="navigation" icon="/icons/component-navigation-icon.png">
<DocsCard header="Navigation" href="/angular/navigation" icon="/icons/component-navigation-icon.png">
<p>Discover how to handle routing and navigation in Ionic Angular apps using the Angular Router.</p>
</DocsCard>

Expand Down
4 changes: 2 additions & 2 deletions docs/angular/your-first-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Highlights include:

- 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.mdx), [Filesystem](/native/filesystem.mdx), and [Preferences](/native/preferences.mdx) APIs.
- Photo Gallery functionality powered by the Capacitor [Camera](../native/camera.mdx), [Filesystem](../native/filesystem.mdx), and [Preferences](../native/preferences.mdx) APIs.

Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-angular) referenced in this guide on GitHub.

Expand Down Expand Up @@ -98,7 +98,7 @@ npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem

### PWA Elements {/* #pwa-elements */}

Some Capacitor plugins, including the [Camera API](/native/camera.mdx), provide the web-based functionality and UI via the Ionic [PWA Elements library](https://github.com/ionic-team/pwa-elements).
Some Capacitor plugins, including the [Camera API](../native/camera.mdx), provide the web-based functionality and UI via the Ionic [PWA Elements library](https://github.com/ionic-team/pwa-elements).

It's a separate dependency, so install it next:

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/your-first-app/2-taking-photos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sidebar_label: Taking Photos
/>
</head>

Now for the fun part - adding the ability to take photos with the device’s camera using the Capacitor [Camera API](/native/camera.mdx). We’ll begin with building it for the web, then make some small tweaks to make it work on mobile (iOS and Android).
Now for the fun part - adding the ability to take photos with the device’s camera using the Capacitor [Camera API](../../native/camera.mdx). We’ll begin with building it for the web, then make some small tweaks to make it work on mobile (iOS and Android).

## Photo Service {/* #photo-service */}

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/your-first-app/3-saving-photos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export interface UserPhoto {
}
```

We'll use the Capacitor [Filesystem API](/native/filesystem.mdx) to save the photo. First, convert the photo to base64 format.
We'll use the Capacitor [Filesystem API](../../native/filesystem.mdx) to save the photo. First, convert the photo to base64 format.

Then, pass the data to the Filesystem's `writeFile` method. Recall that we display photos by setting the image's source path (`src`) to the `webviewPath` property. So, set the `webviewPath` and return the new `Photo` object.

Expand Down
2 changes: 1 addition & 1 deletion docs/angular/your-first-app/4-loading-photos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sidebar_label: Loading Photos

We’ve implemented photo taking and saving to the filesystem. There’s one last piece of functionality missing: the photos are stored in the filesystem, but we need a way to save pointers to each file so that they can be displayed again in the photo gallery.

Fortunately, this is easy: we’ll leverage the Capacitor [Preferences API](/native/preferences.mdx) to store our array of Photos in a key-value store.
Fortunately, this is easy: we’ll leverage the Capacitor [Preferences API](../../native/preferences.mdx) to store our array of Photos in a key-value store.

## Preferences API {/* #preferences-api */}

Expand Down
Loading
Loading