diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml
index c247a0a6a92..69ef7cea290 100644
--- a/.github/workflows/CI.yml
+++ b/.github/workflows/CI.yml
@@ -48,6 +48,22 @@ jobs:
run: npm run typecheck
- name: 🔤 Spell Check
run: npm run spellcheck
+ # Docusaurus derives a heading's anchor from its text, so renaming a
+ # heading moves the anchor and breaks every inbound link. An explicit id
+ # survives the rename, and lets a translation keep the English anchor
+ # after the heading text is translated.
+ #
+ # Nothing in Docusaurus enforces this: a page whose headings are all
+ # unpinned builds clean. So run its own generator and fail if it had
+ # anything to add.
+ - name: 🔗 Heading IDs
+ run: |
+ npm run heading-ids
+ if ! git diff --quiet -- docs; then
+ echo "::error::Headings are missing explicit ids. Run \`npm run heading-ids\` and commit the result."
+ git diff -- docs
+ exit 1
+ fi
- uses: ./.github/workflows/actions/check-translations
cross-platform:
diff --git a/.prettierignore b/.prettierignore
index 24b5b1740a6..90a6a6c2be7 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -11,8 +11,6 @@ src/theme/Layout/index.tsx
src/theme/NavbarItem/LocaleDropdownNavbarItem/index.tsx
src/theme/prism-include-languages.ts
-legacy-stencil-components
-scripts/bak
# Auto-generated files
docs/native
diff --git a/cspell-wordlist.txt b/cspell-wordlist.txt
index 13b3252d864..a66d66fb1eb 100644
--- a/cspell-wordlist.txt
+++ b/cspell-wordlist.txt
@@ -43,6 +43,7 @@ fortawesome
frontmatter
fullscreen
geolocation
+headerless
iconset
interactives
isopen
@@ -53,6 +54,8 @@ jsdelivr
keyframes
keytool
lifecycles
+llms
+llmstxt
localstorage
mobileweb
phablet
diff --git a/cspell.json b/cspell.json
index 66681e60f72..057dc5efc77 100644
--- a/cspell.json
+++ b/cspell.json
@@ -10,7 +10,9 @@
"ignoreRegExpList": [
"/(```+)[\\s\\S]+?\\1/g",
"`([^`]*)`",
- "/:[a-zA-Z0-9-_\\+]+:/g"
+ "/:[a-zA-Z0-9-_\\+]+:/g",
+ // Pinned heading ids, as in `## Using isOpen {/* #using-isopen */}`.
+ "/\\{\\/\\*\\s*#[a-z0-9-]+\\s*\\*\\/\\}/g"
],
"ignorePaths": [
"docs/cli",
diff --git a/docs/angular/add-to-existing.mdx b/docs/angular/add-to-existing.mdx
index 4b958cf5c34..2ef3d723578 100644
--- a/docs/angular/add-to-existing.mdx
+++ b/docs/angular/add-to-existing.mdx
@@ -22,7 +22,7 @@ This guide uses `.css` file extensions for stylesheets. If you created your Angu
:::
-## Setup
+## Setup {/* #setup */}
:::info
@@ -32,7 +32,7 @@ This guide follows the structure of an Angular app created with the Angular CLI.
You can add Ionic Angular to your existing Angular project using the Angular CLI's `ng add` feature or by installing it manually.
-### Using ng add
+### Using ng add {/* #using-ng-add */}
The easiest way to add Ionic Angular is to use the Angular CLI's `ng add` feature:
@@ -42,17 +42,17 @@ ng add @ionic/angular
This will install the `@ionic/angular` package and automatically configure the necessary imports and styles.
-### Manual Installation
+### Manual Installation {/* #manual-installation */}
If you prefer to install Ionic Angular manually, you can follow these steps:
-#### 1. Install the Package
+#### 1. Install the Package {/* #1-install-the-package */}
```bash
npm install @ionic/angular
```
-#### 2. Add Ionic Framework Stylesheets
+#### 2. Add Ionic Framework Stylesheets {/* #2-add-ionic-framework-stylesheets */}
Replace the existing `styles` array in `angular.json` with the following:
@@ -80,7 +80,7 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography.
:::
-#### 3. Configure Ionic Angular
+#### 3. Configure Ionic Angular {/* #3-configure-ionic-angular */}
Update `src/app/app.config.ts` to include `provideIonicAngular`:
@@ -98,7 +98,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.
-## Using Individual Components
+## Using Individual Components {/* #using-individual-components */}
After completing the setup above, you can start using Ionic components in your existing Angular app. Here's an example of how to use them:
@@ -125,11 +125,11 @@ export class App {}
Visit the [components](/components.mdx) page for all of the available Ionic components.
-## Using Ionic Pages
+## Using Ionic Pages {/* #using-ionic-pages */}
If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
-#### 1. Add Additional Ionic Framework Stylesheets
+#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
Replace the existing `styles` array in `angular.json` with the following:
@@ -174,7 +174,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).
-#### 2. Set up Theming
+#### 2. Set up Theming {/* #2-set-up-theming */}
Create a `src/theme/variables.css` file with the following content:
@@ -193,7 +193,7 @@ Create a `src/theme/variables.css` file with the following content:
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 {/* #3-update-the-app-component */}
Update `src/app/app.html` to the following:
@@ -218,7 +218,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/angular';
export class App {}
```
-#### 4. Create a Home Page
+#### 4. Create a Home Page {/* #4-create-a-home-page */}
Start by adding a template at `src/app/home/home.html`:
@@ -293,7 +293,7 @@ Finally, add a `src/app/home/home.css` file:
}
```
-#### 5. Set up Routing
+#### 5. Set up Routing {/* #5-set-up-routing */}
Update `src/app/app.routes.ts` to add a `home` route:
@@ -316,7 +316,7 @@ export const routes: Routes = [
You're all set! Your Ionic Angular app is now configured with full Ionic page support. Run `ng serve` to start your development server and view your app.
-## Next Steps
+## Next Steps {/* #next-steps */}
Now that you have Ionic Angular integrated into your project, check out:
diff --git a/docs/angular/build-options.mdx b/docs/angular/build-options.mdx
index f852e122236..f9dc9e3323a 100644
--- a/docs/angular/build-options.mdx
+++ b/docs/angular/build-options.mdx
@@ -7,7 +7,7 @@ Developers have two options for using Ionic components: Standalone or Modules. T
The Standalone approach uses modern Angular APIs and is the recommended way to build Ionic applications. The Modules approach, including `IonicModule`, is **deprecated** and will be removed in a future major release. New projects should use the Standalone approach. Existing apps will continue to work but should plan to migrate. Refer to [Migrating from Modules to Standalone](#migrating-from-modules-to-standalone) for migration guidance.
-## Standalone
+## Standalone {/* #standalone */}
:::info
@@ -15,7 +15,7 @@ Ionic UI components as Angular standalone components is supported starting in Io
:::
-### Overview
+### Overview {/* #overview */}
Developers can use Ionic components as standalone components to take advantage of treeshaking and newer Angular features. This option involves importing specific Ionic components in the Angular components you want to use them in. Developers can use Ionic standalone components even if their Angular application is NgModule-based.
@@ -37,7 +37,7 @@ Ionic ships standalone components from a single entry point (`@ionic/angular`).
:::
-### Usage with Standalone-based Applications
+### Usage with Standalone-based Applications {/* #usage-with-standalone-based-applications */}
:::warning
@@ -206,7 +206,7 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us
-### Usage with NgModule-based Applications
+### Usage with NgModule-based Applications {/* #usage-with-ngmodule-based-applications */}
:::warning
@@ -371,7 +371,7 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us
-## Modules
+## Modules {/* #modules */}
:::warning[Deprecation Notice]
@@ -379,7 +379,7 @@ The Modules approach, including `IonicModule`, is **deprecated** and will be rem
:::
-### Overview
+### Overview {/* #overview-1 */}
Developers can also use the Modules approach by importing `IonicModule` and calling `IonicModule.forRoot()` in the `imports` array in `app.module.ts`. This registers a version of Ionic where Ionic components will be lazily loaded at runtime.
@@ -392,7 +392,7 @@ Developers can also use the Modules approach by importing `IonicModule` and call
1. Lazily loading Ionic components means that the compiler does not know which components are needed at build time. This means your final application bundle may be much larger than it needs to be.
2. Developers are unable to use newer Angular features such as [ESBuild](https://angular.io/guide/esbuild).
-### Usage
+### Usage {/* #usage */}
In the example below, we are using `IonicModule` to create a lazily loaded version of Ionic. We can then reference any Ionic component without needing to explicitly import it.
@@ -412,7 +412,7 @@ import { AppComponent } from './app.component';
export class AppModule {}
```
-## Migrating from Modules to Standalone
+## Migrating from Modules to Standalone {/* #migrating-from-modules-to-standalone */}
:::tip
@@ -428,7 +428,7 @@ Migrating to Ionic standalone components must be done all at the same time and c
Developers are encouraged to try the [automated migration utility](https://github.com/ionic-team/ionic-angular-standalone-codemods), though they can also follow the steps below if they would like to manually migrate their applications.
-### Standalone-based Applications
+### Standalone-based Applications {/* #standalone-based-applications */}
Follow these steps if your Angular application is already using the standalone architecture, and you want to use Ionic UI components as standalone components too.
@@ -551,7 +551,7 @@ export class TestComponent {}
}
```
-### NgModule-based Applications
+### NgModule-based Applications {/* #ngmodule-based-applications */}
Follow these steps if your Angular application is still using the NgModule architecture, but you want to adopt Ionic UI components as standalone components now.
diff --git a/docs/angular/injection-tokens.mdx b/docs/angular/injection-tokens.mdx
index 2367036ab74..653f5bcadf7 100644
--- a/docs/angular/injection-tokens.mdx
+++ b/docs/angular/injection-tokens.mdx
@@ -13,7 +13,7 @@ sidebar_label: Injection Tokens
Ionic provides Angular injection tokens that allow you to access Ionic elements through Angular's dependency injection system. This provides a more Angular-idiomatic way to interact with Ionic components programmatically.
-## Benefits
+## Benefits {/* #benefits */}
Using injection tokens provides several advantages:
@@ -22,13 +22,13 @@ Using injection tokens provides several advantages:
- **Simplified Code**: Eliminates the need for `ViewChild` queries or manual element references
- **Better Testing**: Easier to mock and test components that use injection tokens
-## IonModalToken
+## IonModalToken {/* #ionmodaltoken */}
The `IonModalToken` injection token allows you to inject a reference to the current modal element directly into your Angular components. This is particularly useful when you need to programmatically control modal behavior, listen to modal events, or access modal properties.
Starting in `@ionic/angular` v8.7.0, you can use this injection token to streamline modal interactions in your Angular applications.
-### Basic Usage
+### Basic Usage {/* #basic-usage */}
To use the `IonModalToken`, inject it into your component's constructor:
@@ -60,7 +60,7 @@ export class ModalComponent {
}
```
-### Listening to Modal Events
+### Listening to Modal Events {/* #listening-to-modal-events */}
You can use the injected modal reference to listen to modal lifecycle events:
@@ -102,7 +102,7 @@ export class ModalComponent implements OnInit {
}
```
-### Accessing Modal Properties
+### Accessing Modal Properties {/* #accessing-modal-properties */}
The injected modal reference provides access to all modal properties and methods:
@@ -143,7 +143,7 @@ export class ModalComponent implements OnInit {
}
```
-### Opening a Modal with Injection Token Content
+### Opening a Modal with Injection Token Content {/* #opening-a-modal-with-injection-token-content */}
When opening a modal that uses the injection token, you can pass the component directly to the modal controller:
diff --git a/docs/angular/lifecycle.mdx b/docs/angular/lifecycle.mdx
index c6a7a79aab4..4032209defe 100644
--- a/docs/angular/lifecycle.mdx
+++ b/docs/angular/lifecycle.mdx
@@ -15,7 +15,7 @@ This guide covers how the page life cycle works in an app built with Ionic and A

-## Angular Life Cycle Events
+## Angular Life Cycle Events {/* #angular-life-cycle-events */}
Ionic embraces the life cycle events provided by Angular. The two Angular events you will find using the most are:
@@ -36,7 +36,7 @@ On **Angular 18 through 21** this only affects you if you set `OnPush` on those
:::
-## Ionic Page Events
+## Ionic Page Events {/* #ionic-page-events */}
In addition to the Angular life cycle events, Ionic Angular provides a few additional events that you can use:
@@ -55,7 +55,7 @@ For `ionViewWillLeave` and `ionViewDidLeave`, `ionViewWillLeave` gets called dir

-## How Ionic Handles the Life of a Page
+## How Ionic Handles the Life of a Page {/* #how-ionic-handles-the-life-of-a-page */}
Ionic has its router outlet, called ``. This outlet extends Angular's `` with some additional functionality to enable better experiences for mobile devices.
@@ -70,7 +70,7 @@ Because of this special handling, the `ngOnInit` and `ngOnDestroy` methods might
`ngOnInit` will only fire each time the page is freshly created, but not when navigated back to the page. For instance, navigating between each page in a tabs interface will only call each page's `ngOnInit` method once, but not on subsequent visits. `ngOnDestroy` will only fire when a page "popped".
-## Route Guards
+## Route Guards {/* #route-guards */}
In Ionic 3, there were a couple of additional life cycle methods that were useful to control when a page could be entered (`ionViewCanEnter`) and left (`ionViewCanLeave`). These could be used to protect pages from unauthorized users and to keep a user on a page when you don't want them to leave (like during a form fill).
@@ -97,7 +97,7 @@ To use this guard, add it to the appropriate param in the route definition:
For more info on how to use route guards, go to Angular's [router documentation](https://angular.io/guide/router).
-## Guidance for Each Life Cycle Method
+## Guidance for Each Life Cycle Method {/* #guidance-for-each-life-cycle-method */}
Below are some tips on use cases for each of the life cycle events.
diff --git a/docs/angular/navigation.mdx b/docs/angular/navigation.mdx
index 05582edf5a1..8d51e642855 100644
--- a/docs/angular/navigation.mdx
+++ b/docs/angular/navigation.mdx
@@ -17,7 +17,7 @@ This guide covers how routing works in an app built with Ionic and Angular.
The Angular Router is one of the most important libraries in an Angular application. Without it, apps would be single view/single context apps or would not be able to maintain their navigation state on browser reloads. With Angular Router, we can create rich apps that are linkable and have rich animations (when paired with Ionic of course). Let's walk through the basics of the Angular Router and how we can configure it for Ionic apps.
-## A simple Route
+## A simple Route {/* #a-simple-route */}
For most apps, having some sort of route is often required. The most basic configuration looks a bit like this:
@@ -38,7 +38,7 @@ import { RouterModule } from '@angular/router';
The simplest breakdown for what we have here is a path/component lookup. When our app loads, the router kicks things off by reading the URL the user is trying to load. In our sample, our route looks for `''`, which is essentially our index route. So for this, we load the `LoginComponent`. Fairly straight forward. This pattern of matching paths with a component continues for every entry we have in the router config. But what if we wanted to load a different path on our initial load?
-## Handling Redirects
+## Handling Redirects {/* #handling-redirects */}
For this we can use router redirects. Redirects work the same way that a typical route object does, but just includes a few different keys.
@@ -70,7 +70,7 @@ Alternatively, if we used:
Then load both `/route1/route2/route3` and `/route1/route2/route4`, we'll be redirected for both routes. This is because `pathMatch: 'prefix'` will match only part of the path.
-## Navigating to different routes
+## Navigating to different routes {/* #navigating-to-different-routes */}
Talking about routes is good and all, but how does one actually navigate to said routes? For this, we can use the `routerLink` directive. Let's go back and take our simple router setup from earlier:
@@ -118,7 +118,7 @@ export class LoginComponent {
Both options provide the same navigation mechanism, just fitting different use cases.
-### Navigating using LocationStrategy.historyGo
+### Navigating using LocationStrategy.historyGo {/* #navigating-using-locationstrategyhistorygo */}
Angular Router has a [LocationStrategy.historyGo](https://angular.io/api/common/LocationStrategy#historyGo) method that allows developers to move forward or backward through the application history. Let's walk through an example.
@@ -130,7 +130,7 @@ If you were to call `LocationStrategy.historyGo(-2)` on `/pageC`, you would be b
An key characteristic of `LocationStrategy.historyGo()` is that it expects your application history to be linear. This means that `LocationStrategy.historyGo()` should not be used in applications that make use of non-linear routing. Refer to [Linear Routing versus Non-Linear Routing](#linear-routing-versus-non-linear-routing) for more information.
-## Lazy loading routes
+## Lazy loading routes {/* #lazy-loading-routes */}
Now the current way our routes are setup makes it so they are included in the same chunk as the root app.module, which is not ideal. Instead, the router has a setup that allows the components to be isolated to their own chunks.
@@ -175,7 +175,7 @@ We're excluding some additional content and only including the necessary parts.
Here, we have a typical Angular Module setup, along with a RouterModule import, but we're now using `forChild` and declaring the component in that setup. With this setup, when we run our build, we will produce separate chunks for both the app component, the login component, and the detail component.
-## Standalone Components
+## Standalone Components {/* #standalone-components */}
Standalone components allow developers to lazy load a component on a route without having to declare the component to an Angular module.
@@ -203,15 +203,15 @@ If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to a
To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components).
-## Live Example
+## Live Example {/* #live-example */}
import NavigationPlayground from '@site/static/usage/v10/navigation/index.mdx';
-## Linear Routing versus Non-Linear Routing
+## Linear Routing versus Non-Linear Routing {/* #linear-routing-versus-non-linear-routing */}
-### Linear Routing
+### Linear Routing {/* #linear-routing */}
If you have built a web app that uses routing, you likely have used linear routing before. Linear routing means that you can move forward or backward through the application history by pushing and popping pages.
@@ -235,7 +235,7 @@ When we press the back button, we follow that same routing path except in revers
The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.
-### Non-Linear Routing
+### Non-Linear Routing {/* #non-linear-routing */}
Non-linear routing is a concept that may be new to many web developers learning to build mobile apps with Ionic.
@@ -263,7 +263,7 @@ If tapping the back button simply called `LocationStrategy.historyGo(-1)` from t
Non-linear routing allows for sophisticated user flows that linear routing cannot handle. However, certain linear routing APIs such as `LocationStrategy.historyGo()` cannot be used in this non-linear environment. This means that `LocationStrategy.historyGo()` should not be used when using tabs or nested outlets.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose */}
We recommend keeping your application as simple as possible until you need to add non-linear routing. Non-linear routing is very powerful, but it also adds a considerable amount of complexity to mobile applications.
@@ -273,11 +273,11 @@ For more on tabs, please refer to [Working with Tabs](#working-with-tabs).
For more on nested router outlets, please refer to [Nested Routes](#nested-routes).
-## Shared URLs versus Nested Routes
+## Shared URLs versus Nested Routes {/* #shared-urls-versus-nested-routes */}
A common point of confusion when setting up routing is deciding between shared URLs or nested routes. This part of the guide will explain both and help you decide which one to use.
-### Shared URLs
+### Shared URLs {/* #shared-urls */}
Shared URLs is a route configuration where routes have pieces of the URL in common. The following is an example of a shared URL configuration:
@@ -296,7 +296,7 @@ const routes: Routes = [
The above routes are considered "shared" because they reuse the `dashboard` piece of the URL.
-### Nested Routes
+### Nested Routes {/* #nested-routes */}
Nested Routes is a route configuration where routes are listed as children of other routes. The following is an example of a nested route configuration:
@@ -321,7 +321,7 @@ const routes: Routes = [
The above routes are nested because they are in the `children` array of the parent route. Notice that the parent route renders the `DashboardRouterOutlet` component. When you nest routes, you need to render another instance of `ion-router-outlet`.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose-1 */}
Shared URLs are great when you want to transition from page A to page B while preserving the relationship between the two pages in the URL. In our previous example, a button on the `/dashboard` page could transition to the `/dashboard/stats` page. The relationship between the two pages is preserved because of a) the page transition and b) the url.
@@ -329,7 +329,7 @@ Nested routes should be used when you want to render content in outlet A while a
There are very few use cases in which nested routes make sense in mobile applications. When in doubt, use the shared URL route configuration. We strongly caution against using nested routing in contexts other than tabs as it can quickly make navigating your app confusing.
-## Working with Tabs
+## Working with Tabs {/* #working-with-tabs */}
With Tabs, the Angular Router provides Ionic the mechanism to know what components should be loaded, but the heavy lifting is actually done by the tabs component. Let's walk through a simple example.
@@ -378,7 +378,7 @@ Here we have a "tabs" path that we load. In this example we call the path "tabs"
If you've built apps with Ionic before, this should feel familiar. We create a `ion-tabs` component, and provide a `ion-tab-bar`. The `ion-tab-bar` provides a `ion-tab-button` with a `tab` property that is associated with the tab "outlet" in the router config. Note that the latest version of `@ionic/angular` no longer requires ``, but instead allows developers to fully customize the tab bar, and the single source of truth lives within the router configuration.
-### How Tabs in Ionic Work
+### How Tabs in Ionic Work {/* #how-tabs-in-ionic-work */}
Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
@@ -386,7 +386,7 @@ This behavior is important to note as it is different than most tab implementati
Since Ionic is focused on helping developers build mobile apps, the tabs in Ionic are designed to match native mobile tabs as closely as possible. As a result, there may be certain behaviors in Ionic's tabs that differ from tabs implementations in other UI libraries. Read on to learn more about some of these differences.
-### Child Routes within Tabs
+### Child Routes within Tabs {/* #child-routes-within-tabs */}
When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `/tabs/tab1/view` route as a sibling of the `/tabs/tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `ion-tab-bar`.
@@ -442,7 +442,7 @@ const routes: Routes = [
];
```
-### Switching Between Tabs
+### Switching Between Tabs {/* #switching-between-tabs */}
Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
diff --git a/docs/angular/overlays.mdx b/docs/angular/overlays.mdx
index 423a91e02ac..cbe6a85dbbc 100644
--- a/docs/angular/overlays.mdx
+++ b/docs/angular/overlays.mdx
@@ -13,7 +13,7 @@ sidebar_label: Overlays
Ionic provides overlay components such as modals and popovers that display content on top of your application. In Angular, these overlays can be created using controllers like `ModalController` and `PopoverController`.
-## Creating Overlays
+## Creating Overlays {/* #creating-overlays */}
Overlays can be created programmatically using their respective controllers:
@@ -41,13 +41,13 @@ export class HomeComponent {
}
```
-## Custom Injectors
+## Custom Injectors {/* #custom-injectors */}
By default, overlay components use the root injector for dependency injection. This means that services or tokens provided at the route level or within a specific component tree are not accessible inside the overlay.
The `injector` option allows you to pass a custom Angular `Injector` when creating a modal or popover. This enables overlay components to access services and tokens that are not available in the root injector.
-### Use Cases
+### Use Cases {/* #use-cases */}
Custom injectors are useful when you need to:
@@ -55,7 +55,7 @@ Custom injectors are useful when you need to:
- Use Angular CDK's `Dir` directive for bidirectional text support
- Access any providers that are not registered at the root level
-### Usage
+### Usage {/* #usage */}
To use a custom injector, pass it to the `create()` method:
@@ -101,7 +101,7 @@ export class MyModalComponent {
}
```
-### Creating a Custom Injector
+### Creating a Custom Injector {/* #creating-a-custom-injector */}
You can also create a custom injector with specific providers:
@@ -139,7 +139,7 @@ export class FeatureComponent {
}
```
-### Using with Angular CDK Directionality
+### Using with Angular CDK Directionality {/* #using-with-angular-cdk-directionality */}
A common use case is providing the Angular CDK `Dir` directive to overlays for bidirectional text support:
@@ -169,7 +169,7 @@ export class FeatureComponent {
}
```
-### Popover Controller
+### Popover Controller {/* #popover-controller */}
The `PopoverController` supports the same `injector` option:
@@ -199,7 +199,7 @@ export class FeatureComponent {
}
```
-## Angular Options Types
+## Angular Options Types {/* #angular-options-types */}
Ionic Angular exports its own `ModalOptions` and `PopoverOptions` types that extend the core options with Angular-specific properties like `injector`:
@@ -212,7 +212,7 @@ These types are exported from `@ionic/angular` and `@ionic/angular/lazy`:
import type { ModalOptions, PopoverOptions } from '@ionic/angular';
```
-## Docs for Overlays in Ionic
+## Docs for Overlays in Ionic {/* #docs-for-overlays-in-ionic */}
For full docs and usage examples, visit the docs page for each of the overlays in Ionic:
diff --git a/docs/angular/overview.mdx b/docs/angular/overview.mdx
index 923c4b5410e..1fb4aa3982c 100644
--- a/docs/angular/overview.mdx
+++ b/docs/angular/overview.mdx
@@ -16,19 +16,19 @@ import DocsCards from '@components/global/DocsCards';
`@ionic/angular` brings the full power of the Ionic Framework to Angular developers. It offers seamless integration with the Angular ecosystem, so you can build high-quality cross-platform apps using familiar Angular tools, components, and best practices. You also get access to Ionic's extensive UI library and native capabilities.
-## Angular Version Support
+## 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).
-## Angular Tooling
+## Angular Tooling {/* #angular-tooling */}
Ionic uses the official Angular stack for building apps and routing, so your app can fall in line with the rest of the Angular ecosystem. In cases where more opinionated features are needed, Ionic provides `@ionic/angular-toolkit`, which builds and integrates with the [official Angular CLI](https://angular.io/cli) and provides features that are specific to `@ionic/angular` apps.
-## Native Tooling
+## Native Tooling {/* #native-tooling */}
[Capacitor](https://capacitorjs.com) is the official cross-platform runtime for Ionic Angular, enabling your apps to run natively on iOS, Android, and the web with a single codebase.
-## Installation
+## Installation {/* #installation */}
Before you begin, make sure you have [Node.js](https://nodejs.org/) (which includes npm) installed on your machine.
@@ -40,7 +40,7 @@ $ cd myApp
$ ionic serve █
```
-## Resources
+## Resources {/* #resources */}
diff --git a/docs/angular/performance.mdx b/docs/angular/performance.mdx
index 14ac3db954e..0faa660c24d 100644
--- a/docs/angular/performance.mdx
+++ b/docs/angular/performance.mdx
@@ -11,7 +11,7 @@ sidebar_label: Performance
/>
-## \*ngFor with Ionic Components
+## \*ngFor with Ionic Components {/* #ngfor-with-ionic-components */}
When using `*ngFor` with Ionic components, we recommend using Angular's `trackBy` option. This allows Angular to manage change propagation in a much more efficient way and only update the content inside of the component rather than re-create the component altogether.
@@ -44,17 +44,17 @@ In this example, we have an array of objects called `items`. Each object contain
For more information, refer to the [Angular NgForOf change propagation documentation](https://angular.io/api/common/NgForOf#change-propagation).
-## From the Ionic Team
+## From the Ionic Team {/* #from-the-ionic-team */}
[How to Lazy Load in Ionic Angular](https://ionicframework.com/blog/how-to-lazy-load-in-ionic-angular/)
[Improved Perceived Performance with Skeleton Screens](https://ionicframework.com/blog/improved-perceived-performance-with-skeleton-screens/)
-## From the Angular Team
+## From the Angular Team {/* #from-the-angular-team */}
[Build performant and progressive Angular apps](https://web.dev/angular) - web.dev
-## From the Community
+## From the Community {/* #from-the-community */}
{/* cspell:disable */}
diff --git a/docs/angular/platform.mdx b/docs/angular/platform.mdx
index 7aa72bba712..ad013cff64e 100644
--- a/docs/angular/platform.mdx
+++ b/docs/angular/platform.mdx
@@ -15,7 +15,7 @@ import TabItem from '@theme/TabItem';
The Platform service can be used to get information about your current device. You can get all of the platforms associated with the device using the `platforms` method, including whether the app is being viewed from a tablet, if it's on a mobile device or browser, and the exact platform (iOS, Android, etc). You can also get the orientation of the device, if it uses right-to-left language direction, and much much more. With this information you can completely customize your app to fit any device.
-## Usage
+## Usage {/* #usage */}
-## Methods
+## Methods {/* #methods */}
-### `is`
+### `is` {/* #is */}
| | |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Depending on the platform the user is on, `is(platformName)` will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: `mobile`, `ios`, `ipad`, and `tablet`. Additionally, if the app was running from Cordova then `cordova` would be true. |
| **Signature** | `is(platformName: Platforms) => boolean` |
-#### Parameters
+#### Parameters {/* #parameters */}
| Name | Type | Description |
| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `platformName` | `Platforms` | Name of the platform. Available options are android, capacitor, cordova, desktop, electron, hybrid, ios, ipad, iphone, mobile, phablet, pwa, tablet |
-#### Platforms
+#### Platforms {/* #platforms */}
Below is a table listing all the possible platform values along with corresponding descriptions.
@@ -91,7 +91,7 @@ Below is a table listing all the possible platform values along with correspondi
| pwa | a PWA app |
| tablet | a tablet device |
-#### Customizing Platform Detection Functions
+#### 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.
@@ -179,82 +179,82 @@ type PlatformConfig = {
};
```
-### `platforms`
+### `platforms` {/* #platforms-1 */}
| | |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Depending on what device you are on, `platforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return `mobile`, `ios`, and `iphone`. |
| **Signature** | `platforms() => string[]` |
-### `ready`
+### `ready` {/* #ready */}
| | |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Returns a promise when the platform is ready and native functionality can be called. If the app is running from within a web browser, then the promise will resolve when the DOM is ready. When the app is running from an application engine such as Cordova, then the promise will resolve when Cordova triggers the `deviceready` event. The resolved value is the `readySource`, which states the platform that was used.
For example, when Cordova is ready, the resolved ready source is `cordova`. The default ready source value will be `dom`. The `readySource` is useful if different logic should run depending on the platform the app is running from. For example, only Capacitor and Cordova can execute the status bar plugin, so the web should not run status bar plugin logic. |
| **Signature** | `ready() => Promise` |
-### `isRTL`
+### `isRTL` {/* #isrtl */}
| | |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Returns if this app is using right-to-left language direction or not. We recommend the app's `index.html` file already has the correct `dir` attribute value set, such as `` or ``. [W3C: Structural markup and right-to-left text in HTML](http://www.w3.org/International/questions/qa-html-dir) |
| **Signature** | `isRTL() => boolean` |
-### `isLandscape`
+### `isLandscape` {/* #islandscape */}
| | |
| --------------- | ----------------------------------------------- |
| **Description** | Returns `true` if the app is in landscape mode. |
| **Signature** | `isLandscape() => boolean` |
-### `isPortrait`
+### `isPortrait` {/* #isportrait */}
| | |
| --------------- | ---------------------------------------------- |
| **Description** | Returns `true` if the app is in portrait mode. |
| **Signature** | `isPortrait() => boolean` |
-### `width`
+### `width` {/* #width */}
| | |
| --------------- | -------------------------------------------------------------------- |
| **Description** | Gets the width of the platform's viewport using `window.innerWidth`. |
| **Signature** | `width() => number` |
-### `height`
+### `height` {/* #height */}
| | |
| --------------- | ---------------------------------------------------------------------- |
| **Description** | Gets the height of the platform's viewport using `window.innerHeight`. |
| **Signature** | `height() => number` |
-### `url`
+### `url` {/* #url */}
| | |
| --------------- | -------------------- |
| **Description** | Get the current url. |
| **Signature** | `url() => string` |
-### `testUserAgent`
+### `testUserAgent` {/* #testuseragent */}
| | |
| --------------- | ---------------------------------------------------------------------- |
| **Description** | Returns `true` if the expression is included in the user agent string. |
| **Signature** | `testUserAgent(expression: string) => boolean` |
-#### Parameters
+#### Parameters {/* #parameters-1 */}
| Name | Type | Description |
| ---------- | ------ | ------------------------------------- |
| expression | string | The string to check in the user agent |
-## Events
+## Events {/* #events */}
-### `pause`
+### `pause` {/* #pause */}
The `pause` event emits when the native platform puts the application into the background, typically when the user switches to a different application. This event emits when a Cordova/Capacitor app is put into the background but doesn't fire in a standard web browser.
-#### Examples
+#### Examples {/* #examples */}
```tsx
this.platform.pause.subscribe(async () => {
@@ -262,11 +262,11 @@ this.platform.pause.subscribe(async () => {
});
```
-### `resize`
+### `resize` {/* #resize */}
The `resize` event emits when the browser window has changed dimensions. This could be from a browser window being physically resized, or from a device changing orientation.
-#### Examples
+#### Examples {/* #examples-1 */}
```tsx
this.platform.resize.subscribe(async () => {
@@ -274,11 +274,11 @@ this.platform.resize.subscribe(async () => {
});
```
-### `resume`
+### `resume` {/* #resume */}
The `resume` event fires when the native platform pulls the application out from the background. This event emits when a Cordova/Capacitor app comes out from the background but doesn't fire in a standard web browser.
-#### Examples
+#### Examples {/* #examples-2 */}
```tsx
this.platform.resume.subscribe(async () => {
diff --git a/docs/angular/pwa.mdx b/docs/angular/pwa.mdx
index 8f9a3e0b00e..94e8293a772 100644
--- a/docs/angular/pwa.mdx
+++ b/docs/angular/pwa.mdx
@@ -11,7 +11,7 @@ sidebar_label: Progressive Web Apps
/>
-## Making your Angular app a PWA
+## Making your Angular app a PWA {/* #making-your-angular-app-a-pwa */}
The two main requirements of a PWA are a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) and a [Web Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/). While it's possible to add both of these to an app manually, the Angular team has an `@angular/pwa` package that can be used to automate this.
@@ -36,7 +36,7 @@ Features like Service Workers and many JavaScript APIs (such as geolocation) req
:::
-## Service Worker configuration
+## Service Worker configuration {/* #service-worker-configuration */}
After `@angular/pwa` has been added, a new `ngsw-config.json` file will be created at the root of the project. This file is responsible for configuring how Angular's service worker mechanism will handle caching assets. By default, the following will be provided:
@@ -66,9 +66,9 @@ After `@angular/pwa` has been added, a new `ngsw-config.json` file will be creat
There are two sections in here, one for app specific resources (JS, CSS, HTML) and assets the app will load on demand. Depending on your app, these options can be customized. For a more detailed guide, read [the official guide from the Angular Team](https://angular.io/guide/service-worker-config).
-## Deploying
+## Deploying {/* #deploying */}
-### Firebase
+### Firebase {/* #firebase */}
Firebase hosting provides many benefits for Progressive Web Apps, including fast response times thanks to CDNs, HTTPS enabled by default, and support for [HTTP2 push](https://firebase.googleblog.com/2016/09/http2-comes-to-firebase-hosting.html).
diff --git a/docs/angular/quickstart.mdx b/docs/angular/quickstart.mdx
index 121ab4048a8..e043b556dda 100644
--- a/docs/angular/quickstart.mdx
+++ b/docs/angular/quickstart.mdx
@@ -18,7 +18,7 @@ Welcome! This guide will walk you through the basics of Ionic Angular developmen
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).
-## Prerequisites
+## Prerequisites {/* #prerequisites */}
Before you begin, make sure you have Node.js and npm installed on your machine.
You can check by running:
@@ -30,7 +30,7 @@ npm -v
If you don't have Node.js and npm, [download Node.js](https://nodejs.org/en/download) (which includes npm).
-## Create a Project with the Ionic CLI
+## Create a Project with the Ionic CLI {/* #create-a-project-with-the-ionic-cli */}
First, install the latest [Ionic CLI](../cli):
@@ -53,7 +53,7 @@ After running `ionic serve`, your project will open in the browser.

-## Explore the Project Structure
+## Explore the Project Structure {/* #explore-the-project-structure */}
Your new app's directory will look like this:
@@ -79,7 +79,7 @@ All file paths in the examples below are relative to the project root directory.
Let's walk through these files to understand the app's structure.
-## View the App Component
+## View the App Component {/* #view-the-app-component */}
The root of your app is defined in `app.component.ts`:
@@ -107,7 +107,7 @@ And its template in `app.component.html`:
This sets up the root of your application, using Ionic's `ion-app` and `ion-router-outlet` components. The router outlet is where your pages will be displayed.
-## View Routes
+## View Routes {/* #view-routes */}
Routes are defined in `app.routes.ts`:
@@ -129,7 +129,7 @@ export const routes: Routes = [
When you visit the root URL (`/`), the `HomePage` component will be loaded.
-## View the Home Page
+## View the Home Page {/* #view-the-home-page */}
The Home page component, defined in `home.page.ts`, imports the Ionic components it uses:
@@ -182,7 +182,7 @@ For detailed information about Ionic layout components, refer to the [Header](/a
:::
-## Add an Ionic Component
+## 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`:
@@ -205,7 +205,7 @@ import { IonButton, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/a
})
```
-## Add a New Page
+## Add a New Page {/* #add-a-new-page */}
To add a new page, generate it with the CLI:
@@ -241,7 +241,7 @@ import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar
The `ion-back-button` will automatically handle navigation back to the previous page, or to `/` if there is no history.
-## Navigate to the New Page
+## Navigate to the New Page {/* #navigate-to-the-new-page */}
To navigate to the new page, update the button in `home.page.html`:
@@ -266,7 +266,7 @@ Navigating can also be performed using Angular's Router service. Refer to the [A
:::
-## Add Icons to the New Page
+## Add Icons to the New Page {/* #add-icons-to-the-new-page */}
Ionic Angular comes with [Ionicons](https://ionic.io/ionicons/) pre-installed. You can use any icon by setting the `name` property on the `ion-icon` component. Add the following icons to `new.page.html`:
@@ -309,7 +309,7 @@ Alternatively, you can register icons in `app.component.ts` to use them througho
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 {/* #call-component-methods */}
Let's add a button that can scroll the content area to the bottom.
@@ -395,7 +395,7 @@ To call methods on Ionic components:
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 {/* #run-on-a-device */}
Ionic's components work everywhere: on iOS, Android, and PWAs. To deploy to mobile, use [Capacitor](https://capacitorjs.com):
@@ -414,7 +414,7 @@ ionic cap open android
Refer to [Capacitor's Getting Started guide](https://capacitorjs.com/docs/getting-started/with-ionic) for more.
-## Explore More
+## Explore More {/* #explore-more */}
This guide covered the basics of creating an Ionic Angular app, adding navigation, and introducing Capacitor for native builds. To dive deeper, check out:
diff --git a/docs/angular/slides.mdx b/docs/angular/slides.mdx
index bbe68a742f2..92cdb76ed1b 100644
--- a/docs/angular/slides.mdx
+++ b/docs/angular/slides.mdx
@@ -21,7 +21,7 @@ import TabItem from '@theme/TabItem';
We recommend [Swiper.js](http://swiperjs.com/) if you need a modern touch slider component. Swiper 9 introduced [Swiper Element](https://swiperjs.com/element) as a replacement for its Angular component, so this guide will go over how to get Swiper Element set up in your Ionic Framework application. It will also go over any migration information you may need to move from `ion-slides` to Swiper Element.
-## Getting Started
+## Getting Started {/* #getting-started */}
First, update to the latest version of Ionic:
@@ -69,13 +69,13 @@ From there, we just have to replace `ion-slides` elements with `swiper-container
```
-## Bundled vs. Core Versions
+## Bundled vs. Core Versions {/* #bundled-vs-core-versions */}
By default, make sure you import the `register` function from `swiper/element/bundle`. This uses the bundled version of Swiper, which automatically includes all modules and stylesheets needed to run Swiper's various features.
If you would like to use the Core version instead, which does not include additional modules automatically, refer to [Swiper's core version and modules documentation](https://swiperjs.com/element#core-version-and-modules). The rest of this migration guide will assume you are using the bundled version.
-## Swiping with Style
+## Swiping with Style {/* #swiping-with-style */}
To migrate over your CSS, first update your selectors to target the new custom elements instead:
@@ -97,7 +97,7 @@ If you were using the CSS custom properties found on `ion-slides`, below is a li
For additional custom CSS, because Swiper Element uses Shadow DOM encapsulation, styles will need to be injected into the Shadow DOM scope. Refer to [Swiper's guide on injecting styles](https://swiperjs.com/element#injecting-styles) for instructions.
-### Additional `ion-slides` Styles
+### Additional `ion-slides` Styles {/* #additional-ion-slides-styles */}
The `ion-slides` component had additional styling that helped create a native look and feel. These styles are **not** required to use Swiper.js with Ionic, but if you would like to maintain the look of `ion-slides` as closely as possible, add the following CSS to your `global.scss`:
@@ -136,7 +136,7 @@ swiper-slide img {
}
```
-## The IonicSlides Module
+## The IonicSlides Module {/* #the-ionicslides-module */}
With `ion-slides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
@@ -198,7 +198,7 @@ If you are using the Core version of Swiper and have installed additional module
:::
-## Properties
+## Properties {/* #properties */}
Swiper options should be provided as individual properties directly on the `` component.
@@ -236,7 +236,7 @@ All properties available in Swiper Element can be found in the [Swiper API param
:::
-## Events
+## Events {/* #events */}
Since the `swiper-container` component is not provided by Ionic Framework, event names will not have an `ionSlide` prefix to them. Additionally, all event names should be lowercase instead of camelCase.
@@ -287,7 +287,7 @@ All events available in Swiper Element can be found in the [Swiper API events do
:::
-## Methods
+## Methods {/* #methods */}
Most methods have been removed in favor of directly accessing the properties of the Swiper instance. To access the Swiper instance, first get a reference to the `` element (such as through `ViewChild`), then access its `swiper` prop:
@@ -341,7 +341,7 @@ All methods and properties available on the Swiper instance can be found in the
:::
-## Effects
+## Effects {/* #effects */}
Effects such as Cube or Fade can be used in Swiper Element with no additional imports, as long as you are using the bundled version of Swiper. For example, the below code will cause the slides to have a flip transition effect:
@@ -355,21 +355,21 @@ For more information on effects in Swiper, please refer to the [Swiper API fade
:::
-## Wrap Up
+## Wrap Up {/* #wrap-up */}
Now that you have Swiper installed, there is a whole set of new Swiper features for you to enjoy. We recommend starting with the [Swiper Element documentation](https://swiperjs.com/element) and then referencing [the Swiper API docs](https://swiperjs.com/swiper-api).
-## FAQ
+## FAQ {/* #faq */}
-### Where can I find an example of this migration?
+### Where can I find an example of this migration? {/* #where-can-i-find-an-example-of-this-migration */}
You can find a sample app with `ion-slides` and the equivalent Swiper usage at https://github.com/ionic-team/slides-migration-samples.
-### Where can I get help with this migration?
+### Where can I get help with this migration? {/* #where-can-i-get-help-with-this-migration */}
If you are running into issues with the migration, please create a post on the [Ionic Forum](https://forum.ionicframework.com/).
-### Where do I file bug reports?
+### Where do I file bug reports? {/* #where-do-i-file-bug-reports */}
Before opening an issue, please consider creating a post on the [Swiper Discussion Board](https://github.com/nolimits4web/swiper/discussions) or the [Ionic Forum](https://forum.ionicframework.com) to check if your issue can be resolved by the community.
diff --git a/docs/angular/storage.mdx b/docs/angular/storage.mdx
index 85ff56b9ae8..f5d1950e58f 100644
--- a/docs/angular/storage.mdx
+++ b/docs/angular/storage.mdx
@@ -21,18 +21,18 @@ Some storage options involve third-party plugins or products. In such cases, we
Here are some common use cases and solutions:
-## Local Application Settings and Data
+## Local Application Settings and Data {/* #local-application-settings-and-data */}
Many applications need to locally store settings as well as other lightweight key/value data. The [Capacitor Preferences](https://capacitorjs.com/docs/apis/preferences) plugin is specifically designed to handle these scenarios.
-## Relational Data Storage (Mobile Only)
+## Relational Data Storage (Mobile Only) {/* #relational-data-storage-mobile-only */}
Some applications, especially those following an offline-first methodology, may require locally storing high volumes of complex relational data. For such scenarios, a SQLite plugin may be used. The most common SQLite plugin offerings are:
- [Cordova SQLite Storage](https://github.com/storesafe/cordova-sqlite-storage) (a [convenience wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/sqlite) also exists for this plugin to aid in implementation)
- [Capacitor Community SQLite Plugin](https://github.com/capacitor-community/sqlite)
-## Non-Relational High Volume Data Storage (Mobile and Web)
+## Non-Relational High Volume Data Storage (Mobile and Web) {/* #non-relational-high-volume-data-storage-mobile-and-web */}
For applications that need to store a high volume of data as well as operate on both web and mobile, a potential solution is to create a key/value pair data storage service that uses [indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) on the web and one of the previously mentioned SQLite plugins on mobile.
@@ -42,7 +42,7 @@ Here a sample of how this can be accomplished:
- [Mobile Service](https://github.com/ionic-enterprise/tutorials-and-demos-ng/blob/main/demos/sqlcipher-kv-pair/src/app/core/mobile-kv-store.ts)
- [Web Service](https://github.com/ionic-enterprise/tutorials-and-demos-ng/blob/main/demos/sqlcipher-kv-pair/src/app/core/web-kv-store.ts)
-## Other Options
+## Other Options {/* #other-options */}
Other storage options that provide local as well as cloud-based storage that work well within Capacitor applications also exist and may integrate well with your application.
diff --git a/docs/angular/testing.mdx b/docs/angular/testing.mdx
index 7fd3668a467..fcae14de461 100644
--- a/docs/angular/testing.mdx
+++ b/docs/angular/testing.mdx
@@ -12,7 +12,7 @@ title: Testing
When an `@ionic/angular` application is generated using the Ionic CLI, it is automatically set up for unit testing and end-to-end testing of the application. This is the same setup that is used by the Angular CLI. Refer to the [Angular Testing Guide](https://angular.io/guide/testing) for detailed information on testing Angular applications.
-## Testing Principles
+## Testing Principles {/* #testing-principles */}
When testing an application, it is best to keep in mind that testing can show if defects are present in a system. However, it is impossible to prove that any non-trivial system is completely free of defects. For this reason, the goal of testing is not to verify that the code is correct but to find problems within the code. This is a subtle but important distinction.
@@ -20,7 +20,7 @@ If we set out to prove that the code is correct, we are more likely to stick to
It is also best to begin testing an application from the very start. This allows defects to be found early in the process when they are easier to fix. This also allows code to be refactored with confidence as new features are added to the system.
-## Unit Testing
+## Unit Testing {/* #unit-testing */}
Unit tests exercise a single unit of code (component, page, service, pipe, etc) in isolation from the rest of the system. Isolation is achieved through the injection of mock objects in place of the code's dependencies. The mock objects allow the test to have fine-grained control of the outputs of the dependencies. The mocks also allow the test to determine which dependencies have been called and what has been passed to them.
@@ -28,7 +28,7 @@ Well-written unit tests are structured such that the unit of code and the featur
Since unit tests exercise the code in isolation, they are fast, robust, and allow for a high degree of code coverage.
-### Using Mocks
+### Using Mocks {/* #using-mocks */}
Unit tests exercise a code module in isolation. To facilitate this, we recommend using Jasmine (https://jasmine.github.io/). Jasmine creates mock objects (which Jasmine calls "spies") to take the place of dependencies while testing. When a mock object is used, the test can control the values returned by calls to that dependency, making the current test independent of changes made to the dependency. This also makes the test setup easier, allowing the test to only be concerned with the code within the module under test.
@@ -36,19 +36,19 @@ Using mocks also allows the test to query the mock to determine if it was called
There are two common ways to create mock objects in Jasmine. Mock objects can be constructed from scratch using `jasmine.createSpy` and `jasmine.createSpyObj` or spies can be installed onto existing objects using `spyOn()` and `spyOnProperty()`.
-#### Using `jasmine.createSpy` and `jasmine.createSpyObj`
+#### Using `jasmine.createSpy` and `jasmine.createSpyObj` {/* #using-jasminecreatespy-and-jasminecreatespyobj */}
`jasmine.createSpyObj` creates a full mock object from scratch with a set of mock methods defined on creation. This is useful in that it is very simple. Nothing needs to be constructed or injected into the test. The disadvantage of using this function is that it allows the creation of objects that may not match the real objects.
`jasmine.createSpy` is similar but it creates a stand-alone mock function.
-#### Using `spyOn()` and `spyOnProperty()`
+#### Using `spyOn()` and `spyOnProperty()` {/* #using-spyon-and-spyonproperty */}
`spyOn()` installs the spy on an existing object. The advantage of using this technique is that if an attempt is made to spy on a method that does not exist on the object, an exception is raised. This prevents the test from mocking methods that do not exist. The disadvantage is that the test needs a fully formed object to begin with, which may increase the amount of test setup required.
`spyOnProperty()` is similar with the difference being that it spies on a property and not a method.
-### General Testing Structure
+### General Testing Structure {/* #general-testing-structure */}
Unit tests are contained in `spec` files with one `spec` file per entity (component, page, service, pipe, etc.). The `spec` files live side-by-side with and are named after the source that they are testing. For example, if the project has a service called WeatherService, the code for it is in a file named `weather.service.ts` with the tests in a file named `weather.service.spec.ts`. Both of those files are in the same folder.
@@ -74,7 +74,7 @@ describe('Calculation', () => {
The outer `describe` call states that the `Calculation` service is being tested, the inner `describe` calls state exactly what functionality is being tested, and the `it` calls state what the test cases are. When run the full label for each test case is a sentence that makes sense (Calculation divide cowardly refuses to divide by zero).
-### Pages and Components
+### Pages and Components {/* #pages-and-components */}
Pages are just Angular components. Thus, pages and components are both tested using [Angular's Component Testing](https://angular.io/guide/testing#component-test-basics) guidelines.
@@ -109,7 +109,7 @@ describe('TabsPage', () => {
When doing component class testing, the component object is accessed using the component object defined via `component = fixture.componentInstance;`. This is an instance of the component class. When doing DOM testing, the `fixture.nativeElement` property is used. This is the actual `HTMLElement` for the component, which allows the test to use standard HTML API methods such as `HTMLElement.querySelector` in order to examine the DOM.
-### Waiting for Components
+### Waiting for Components {/* #waiting-for-components */}
When testing Ionic components, use the `componentOnReady` helper exported from `@ionic/core` rather than calling `el.componentOnReady()` directly. The `el.componentOnReady()` method only exists on lazy-loaded elements and calling it directly throws an error on custom-element builds, which is what standalone projects use. The helper handles both. It awaits the element's own `componentOnReady()` promise when that exists. Otherwise it waits one animation frame, giving the component's inner contents a chance to render. Wait for the callback before asserting against the rendered DOM or running accessibility tests.
@@ -137,11 +137,11 @@ describe('HomePage', () => {
});
```
-## Services
+## Services {/* #services */}
Services often fall into one of two broad categories: utility services that perform calculations and other operations, and data services that perform primarily HTTP operations and data manipulation.
-### Basic Service Testing
+### Basic Service Testing {/* #basic-service-testing */}
The suggested way to test most services is to instantiate the service and manually inject mocks for any dependency the service has. This way, the code can be tested in isolation.
@@ -206,7 +206,7 @@ describe('PayrolService', () => {
});
```
-#### Testing HTTP Data Services
+#### Testing HTTP Data Services {/* #testing-http-data-services */}
Most services that perform HTTP operations will use Angular's HttpClient service in order to perform those operations. For such tests, it is suggested to use Angular's `HttpClientTestingModule`. For detailed documentation of this module, please refer to Angular's [Angular's Testing HTTP requests](https://angular.io/guide/http#testing-http-requests) guide.
@@ -257,7 +257,7 @@ describe('IssTrackingDataService', () => {
});
```
-### Pipes
+### Pipes {/* #pipes */}
A pipe is like a service with a specifically defined interface. It is a class that contains one public method, `transform`, which manipulates the input value (and other optional arguments) in order to create the output that is rendered on the page. To test a pipe: instantiate the pipe, call the transform method, and verify the results.
@@ -309,13 +309,13 @@ describe('NamePipe', () => {
It is also beneficial to exercise the pipe via DOM testing in the components and pages that utilize the pipe.
-## End-to-end Testing
+## End-to-end Testing {/* #end-to-end-testing */}
End-to-end testing is used to verify that an application works as a whole and often includes a connection to live data. Whereas unit tests focus on code units in isolation and thus allow for low-level testing of the application logic, end-to-end tests focus on various user stories or usage scenarios, providing high-level testing of the overall flow of data through the application. Whereas unit tests try to uncover problems with an application's logic, end-to-end tests try to uncover problems that occur when those individual units are used together. End-to-end tests uncover problems with the overall architecture of the application.
Since end-to-end tests exercise user stories and cover the application as a whole rather than individual code modules, end-to-end tests exist in their own application in the project apart from the code for the main application itself. Most end-to-end tests operate by automating common user interactions with the application and examining the DOM to determine the results of those interactions.
-### Test Structure
+### Test Structure {/* #test-structure */}
When an `@ionic/angular` application is generated, a default end-to-end test application is generated in the `e2e` folder. This application uses Protractor to control the browser and Jasmine to structure and execute the tests. The application initially consists of four files:
@@ -324,13 +324,13 @@ When an `@ionic/angular` application is generated, a default end-to-end test app
- `src/app.po.ts` - a page object containing methods that navigate the application, query elements in the DOM, and manipulate elements on the page
- `src/app.e2e-spec.ts` - a testing script
-#### Page Objects
+#### Page Objects {/* #page-objects */}
End-to-end tests operate by automating common user interactions with the application, waiting for the application to respond, and examining the DOM to determine the results of the interaction. This involves a lot of DOM manipulation and examination. If this were all done manually, the tests would be very brittle and difficult to read and maintain.
Page objects encapsulate the HTML for a single page in a TypeScript class, providing an API that the test scripts use to interact with the application. The encapsulation of the DOM manipulation logic in page objects makes the tests more readable and far easier to reason about, lowering the maintenance costs of the test. Creating well-crafted page objects is the key to creating high quality and maintainable end-to-end tests.
-##### Base Page Object
+##### Base Page Object {/* #base-page-object */}
A lot of tests rely on actions such as waiting for a page to be visible, entering text into an input, and clicking a button. The methods used to do this remain consistent with only the CSS selectors used to get the appropriate DOM element changing. Therefore it makes sense to abstract this logic into a base class that can be used by the other page objects.
@@ -396,7 +396,7 @@ export class PageObjectBase {
}
```
-##### Per-Page Abstractions
+##### Per-Page Abstractions {/* #per-page-abstractions */}
Each page in the application will have its own page object class that abstracts the elements on that page. If a base page object class is used, creating the page object involves mostly creating custom methods for elements that are specific to that page. Often, these custom elements take advantage of methods in the base class in order to perform the work that is required.
@@ -433,7 +433,7 @@ export class LoginPage extends PageObjectBase {
}
```
-#### Testing Scripts
+#### Testing Scripts {/* #testing-scripts */}
Similar to unit tests, end-to-end test scripts consist of nested `describe()` and `it()` functions. In the case of end-to-end tests, the `describe()` functions generally denote specific scenarios with the `it()` functions denoting specific behaviors that should be exhibited by the application as actions are performed within that scenario.
@@ -527,15 +527,15 @@ describe('Login', () => {
});
```
-### Configuration
+### Configuration {/* #configuration */}
The default configuration uses the same `environment.ts` file that is used for development. In order to provide better control over the data used by the end-to-end tests, it is often useful to create a specific environment for testing and use that environment for the tests. This section shows one possible way to create this configuration.
-#### Testing Environment
+#### Testing Environment {/* #testing-environment */}
Setting up a testing environment involves creating a new environment file that uses a dedicated testing backend, updating the `angular.json` file to use that environment, and modifying the `e2e` script in the `package.json` to specify the `test` environment.
-##### Create the `environment.e2e.ts` File
+##### Create the `environment.e2e.ts` File {/* #create-the-environmente2ets-file */}
The Angular `environment.ts` and `environment.prod.ts` files are often used to store information such as the base URL for the application's backend data services. Create an `environment.e2e.ts` that provides the same information, only connecting to backend services that are dedicated to testing rather than the development or production backend services. Here is an example:
@@ -547,7 +547,7 @@ export const environment = {
};
```
-##### Modify the `angular.json` File
+##### Modify the `angular.json` File {/* #modify-the-angularjson-file */}
The `angular.json` file needs to be modified to use this file. This is a layered process. Follow the XPaths listed below to add the configuration that is required.
@@ -580,7 +580,7 @@ Add a configuration at `/projects/app-e2e/architect/e2e/configurations` called `
}
```
-##### Modify the `package.json` File
+##### Modify the `package.json` File {/* #modify-the-packagejson-file */}
Modify the `package.json` file so that `npm run e2e` uses the `test` configuration.
@@ -596,7 +596,7 @@ Modify the `package.json` file so that `npm run e2e` uses the `test` configurati
},
```
-#### Test Cleanup
+#### Test Cleanup {/* #test-cleanup */}
If the end-to-end tests modify data in any way it is helpful to reset the data to a known state once the test completes. One way to do that is to:
diff --git a/docs/angular/virtual-scroll.mdx b/docs/angular/virtual-scroll.mdx
index 0ee3289bf3d..d3b799e1fbc 100644
--- a/docs/angular/virtual-scroll.mdx
+++ b/docs/angular/virtual-scroll.mdx
@@ -6,7 +6,7 @@
:::
-## Installation
+## Installation {/* #installation */}
To setup the CDK Scroller, first install `@angular/cdk`:
@@ -43,7 +43,7 @@ When we want to use the CDK Scroller, we'll need to import the module in our com
With this added, we have access to the Virtual Scroller in the Tab1Page component.
-## Usage
+## Usage {/* #usage */}
The CDK Virtual Scroller can be added to a component by adding the `cdk-virtual-scroll-viewport` to a component's template.
@@ -114,7 +114,7 @@ cdk-virtual-scroll-viewport {
Since the viewport is built to fit various use cases, the default sizing is not set and is up to developers to set.
-## Usage with Ionic Components
+## Usage with Ionic Components {/* #usage-with-ionic-components */}
Ionic Framework requires that features such as collapsible large titles, `ion-infinite-scroll`, `ion-refresher`, and `ion-reorder-group` be used within an `ion-content`. To use these experiences with virtual scrolling, you must add the `.ion-content-scroll-host` class to the virtual scroll viewport.
@@ -128,6 +128,6 @@ For example:
```
-## Further Reading
+## Further Reading {/* #further-reading */}
This only covers a small portion of what the CDK Virtual Scroller is capable of. For more details, please refer to the [Angular CDK Virtual Scrolling docs](https://material.angular.io/cdk/scrolling/overview).
diff --git a/docs/angular/your-first-app.mdx b/docs/angular/your-first-app.mdx
index 9da4af2492b..7db2aaac485 100644
--- a/docs/angular/your-first-app.mdx
+++ b/docs/angular/your-first-app.mdx
@@ -24,13 +24,7 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-:::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.mdx).
-
-:::
-
-## What We'll Build
+## What We'll Build {/* #what-well-build */}
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
@@ -42,7 +36,7 @@ Highlights include:
Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-angular) referenced in this guide on GitHub.
-## Download Required Tools
+## Download Required Tools {/* #download-required-tools */}
Download and install these right away to ensure an optimal Ionic development experience:
@@ -52,7 +46,7 @@ Download and install these right away to ensure an optimal Ionic development exp
- **Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode.
- **Mac/Linux** users: virtually any terminal will work.
-## Install Ionic Tooling
+## Install Ionic Tooling {/* #install-ionic-tooling */}
Run the following in the command line terminal to install the Ionic CLI (`ionic`), `native-run`, used to run native binaries on devices and simulators/emulators, and `cordova-res`, used to generate native app icons and splash screens:
@@ -74,7 +68,7 @@ Consider setting up npm to operate globally without elevated permissions. Refer
:::
-## Create an App
+## Create an App {/* #create-an-app */}
Next, create an Ionic Angular app that uses the "Tabs" starter template and adds Capacitor for native functionality:
@@ -102,7 +96,7 @@ Next we'll need to install the necessary Capacitor plugins to make the app's nat
npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem
```
-### PWA Elements
+### 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).
@@ -138,7 +132,7 @@ bootstrapApplication(AppComponent, {
That’s it! Now for the fun part - let’s run the app.
-## Run the App
+## Run the App {/* #run-the-app */}
Run this command next:
@@ -148,7 +142,7 @@ ionic serve
And voilà! Your Ionic app is now running in a web browser. Most of your app can be built and tested right in the browser, greatly increasing development and testing speed.
-## Photo Gallery
+## Photo Gallery {/* #photo-gallery */}
There are three tabs. Click on the "Tab2" tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
diff --git a/docs/angular/your-first-app/2-taking-photos.mdx b/docs/angular/your-first-app/2-taking-photos.mdx
index 2da3b1d7f76..898e2d6fc99 100644
--- a/docs/angular/your-first-app/2-taking-photos.mdx
+++ b/docs/angular/your-first-app/2-taking-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Taking Photos
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 {/* #photo-service */}
All Capacitor logic (Camera usage and other native features) will be encapsulated in a service class. Create `PhotoService` using the `ionic generate` command:
@@ -143,7 +143,7 @@ _(Your selfie is probably much better than mine)_
After taking a photo, it disappears right away. We need to display it within our app and save it for future access.
-## Displaying Photos
+## Displaying Photos {/* #displaying-photos */}
To define the data structure for our photo metadata, create a new interface named `UserPhoto`. Add this interface at the very bottom of the `photo.service.ts` file, immediately after the `PhotoService` class definition:
diff --git a/docs/angular/your-first-app/3-saving-photos.mdx b/docs/angular/your-first-app/3-saving-photos.mdx
index 9cd3743f41e..5529c6dbd2c 100644
--- a/docs/angular/your-first-app/3-saving-photos.mdx
+++ b/docs/angular/your-first-app/3-saving-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Saving Photos
We’re now able to take multiple photos and display them in a photo gallery on the second tab of our app. These photos, however, are not currently being stored permanently, so when the app is closed, they will be deleted.
-## Filesystem API
+## Filesystem API {/* #filesystem-api */}
Fortunately, saving them to the filesystem only takes a few steps. Begin by creating a new class method, `savePicture()`, in the `PhotoService` class. We pass in the `photo` object, which represents the newly captured device photo:
diff --git a/docs/angular/your-first-app/4-loading-photos.mdx b/docs/angular/your-first-app/4-loading-photos.mdx
index 3ff9608ebc2..5a5b5fc6263 100644
--- a/docs/angular/your-first-app/4-loading-photos.mdx
+++ b/docs/angular/your-first-app/4-loading-photos.mdx
@@ -15,7 +15,7 @@ We’ve implemented photo taking and saving to the filesystem. There’s one las
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 {/* #preferences-api */}
Open `photo.service.ts` and begin by defining a new property in the `PhotoService` class that will act as the key for the store.
diff --git a/docs/angular/your-first-app/5-adding-mobile.mdx b/docs/angular/your-first-app/5-adding-mobile.mdx
index b3736d50de6..0f3ce3eb080 100644
--- a/docs/angular/your-first-app/5-adding-mobile.mdx
+++ b/docs/angular/your-first-app/5-adding-mobile.mdx
@@ -13,7 +13,7 @@ strip_number_prefixes: false
Our photo gallery app won’t be complete until it runs on iOS, Android, and the web - all using one codebase. All it takes is some small logic changes to support mobile platforms, installing some native tooling, then running the app on a device. Let’s go!
-## Import Platform API
+## Import Platform API {/* #import-platform-api */}
Let’s start with making some small code changes - then our app will “just work” when we deploy it to a device.
@@ -45,7 +45,7 @@ export class PhotoService {
}
```
-## Platform-specific Logic
+## Platform-specific Logic {/* #platform-specific-logic */}
First, we’ll update the photo saving functionality to support mobile. In the `savePicture()` method, check which platform the app is running on. If it’s “hybrid” (Capacitor, the native runtime), then read the photo file into base64 format using the `Filesystem.readFile()` method. Otherwise, use the same logic as before when running the app on the web.
diff --git a/docs/angular/your-first-app/6-deploying-mobile.mdx b/docs/angular/your-first-app/6-deploying-mobile.mdx
index b7ad08e6920..bf2b0963591 100644
--- a/docs/angular/your-first-app/6-deploying-mobile.mdx
+++ b/docs/angular/your-first-app/6-deploying-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Deploying Mobile
Since we added Capacitor to our project when it was first created, there’s only a handful of steps remaining until the Photo Gallery app is on our device!
-## Capacitor Setup
+## Capacitor Setup {/* #capacitor-setup */}
Capacitor is Ionic’s official app runtime that makes it easy to deploy web apps to native platforms like iOS, Android, and more. If you’ve used Cordova in the past, consider reading more about the [differences between Capacitor and Cordova](https://capacitorjs.com/docs/cordova#differences-between-capacitor-and-cordova).
@@ -44,7 +44,7 @@ Note: After making updates to the native portion of the code (such as adding a n
ionic cap sync
```
-## iOS Deployment
+## iOS Deployment {/* #ios-deployment */}
:::important
@@ -82,7 +82,7 @@ Upon tapping the Camera button on the Photo Gallery tab, the permission prompt w

-## Android Deployment
+## Android Deployment {/* #android-deployment */}
Capacitor Android apps are configured and managed through Android Studio. Before running this app on an Android device, there's a couple of steps to complete.
diff --git a/docs/angular/your-first-app/7-live-reload.mdx b/docs/angular/your-first-app/7-live-reload.mdx
index c300e4730ac..74dac3b0cf0 100644
--- a/docs/angular/your-first-app/7-live-reload.mdx
+++ b/docs/angular/your-first-app/7-live-reload.mdx
@@ -15,7 +15,7 @@ So far, we’ve learned how easy it is to develop a cross-platform app that work
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
+## Live Reload {/* #live-reload */}
Remember `ionic serve`? That was Live Reload working in the browser, allowing us to iterate quickly.
@@ -31,7 +31,7 @@ ionic cap run android -l --external
The Live Reload server will start up, and the native IDE of choice will open if not opened already. Within the IDE, click the Play button to launch the app onto your device.
-## Deleting Photos
+## Deleting Photos {/* #deleting-photos */}
With Live Reload running and the app open on your device, let’s implement photo deletion functionality.
diff --git a/docs/angular/your-first-app/8-distribute.mdx b/docs/angular/your-first-app/8-distribute.mdx
index f029858cb9b..d397a887f3e 100644
--- a/docs/angular/your-first-app/8-distribute.mdx
+++ b/docs/angular/your-first-app/8-distribute.mdx
@@ -15,13 +15,13 @@ Now that you have built your first app, you are going to want to get it distribu
Below we will run through an overview of the steps.
-## Connect Your Repo
+## Connect Your Repo {/* #connect-your-repo */}
Appflow works directly with Git version control and uses your existing code base as the source of truth for Deploy and Package builds. You will first need to integrate with your hosting service, such as GitHub or Bitbucket, or you can push your code directly to Appflow. Once this is completed, Appflow will have access to your code.
For more on connecting your code repository to Appflow, checkout the [Connect your Repo](https://ionic.io/docs/appflow/quickstart/connect) section inside the Appflow docs.
-## Install the Appflow SDK
+## Install the Appflow SDK {/* #install-the-appflow-sdk */}
The Appflow SDK (also known as Ionic Deploy plugin) will allow you to take advantage of arguably two of the best Appflow features: deploying live updates to your app and bypassing the app stores. Ionic Appflow's Live Update feature is shipped with Appflow SDK and features the capabilities of detecting and syncing the updates for your app that you have pushed to your identified channels within the dashboard.
@@ -36,7 +36,7 @@ ionic deploy add \
For prerequisite and additional instructions on installing the Appflow SDK, visit the [Install the Appflow SDK](https://ionic.io/docs/appflow/quickstart/installation) section inside the Appflow docs.
-## Push a Commit
+## Push a Commit {/* #push-a-commit */}
In order for Appflow to access the latest and greatest changes to your code, you will need to push a commit via the version control integration of your choosing. For those that use GitHub or Bitbucket, this would look as follows:
@@ -48,7 +48,7 @@ git push origin main # push the changes from the main branch to your git host
After the push is made, your commit appears under the `Commits` tab of the Appflow Dashboard. For more information, refer to the [Push a Commit](https://ionic.io/docs/appflow/quickstart/push) section inside the Appflow docs.
-## Deploy a Live Update
+## Deploy a Live Update {/* #deploy-a-live-update */}
With the Appflow SDK installed and your commit pushed up to the Dashboard, you are ready to deploy a live update to a device. The Live Update feature uses the installed Appflow SDK with your native application to listen to a particular Deploy Channel Destination. When a live update is assigned to a Channel Destination, that update will be deployed to user devices running binaries that are configured to listen to that specific Channel Destination.
@@ -66,7 +66,7 @@ Assuming the app is configured correctly to listen to the channel you deployed t
To dive into more details on the steps to deploy a live update, as well as additional information such as disabling deploy for development, check out the [Deploy a Live Update](https://ionic.io/docs/appflow/quickstart/deploy) section inside the Appflow docs.
-## Build a Native Binary
+## Build a Native Binary {/* #build-a-native-binary */}
Next up is a native binary for your app build and deploy process. This is done via the [Ionic Package](https://ionic.io/docs/appflow/package/intro) service. First things first, you will need to create a [Package build](https://ionic.io/docs/appflow/package/builds). This can be done by clicking the `Start build` icon from the `Commits` tab or by clicking the `New build` button in the top right from the `Build > Builds` tab. Then you will select the proper commit for your build and fill in all of the several required fields and any optional fields that you want to specify. After filling in all of the information and the build begins, you can check out it's progress and review the logs if you encounter any errors.
@@ -74,19 +74,19 @@ Given a successful Package build, an iOS binary (`.ipa` or IPA) or/and an Androi
Further information regarding building native binaries can be found inside of the [Build a Native Binary](https://ionic.io/docs/appflow/quickstart/package) section inside the Appflow docs.
-## Create an Automation
+## Create an Automation {/* #create-an-automation */}
[Automations](https://ionic.io/docs/appflow/automation/intro) enable you and your team to utilize the full CI/CD powers of Appflow. You can create automations that trigger [Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) every time your team commits new code to a given branch. The automations can also be configured to use different environments and native configurations for building different versions of your app for development, staging, QA and production.
For more information, visit the [Create an Automation](https://ionic.io/docs/appflow/quickstart/automation) section within the Appflow docs. That section covers creating a single automation. However, you can create multiple automations for different branches or workflows and customize them to fit your needs. An important note is that the ability to create an automation is available for those on our [Basic plans](https://ionic.io/pricing) and above.
-## Create an Environment
+## Create an Environment {/* #create-an-environment */}
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be further customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
Creating an Environment is available for those on our [Basic plans](https://ionic.io/pricing) and above. More information on this can be found in the [Create an Environment](https://ionic.io/docs/appflow/quickstart/environment) section within the Appflow docs.
-## Create a Native Configuration
+## Create a Native Configuration {/* #create-a-native-configuration */}
[Native Configurations](https://ionic.io/docs/appflow/package/native-configs) allow you to easily modify common configuration values that can change between different environments (development, production, staging, etc.) so you do not need to use extra logic or manually commit them to version control. Native configurations can be attached to any [Package build](https://ionic.io/docs/appflow/package/intro) or [Automation](https://ionic.io/docs/appflow/automation/intro).
@@ -98,7 +98,7 @@ Native configs can be used to:
For access to the ability to create a Native Configuration, you will need to be on our [Basic plans](https://ionic.io/pricing) and above. Additional details of this feature can be found in the [Create a Native Configuration](https://ionic.io/docs/appflow/quickstart/native-config) section within the Appflow docs.
-## What’s Next?
+## What’s Next? {/* #whats-next */}
Congratulations! You developed a complete cross-platform Photo Gallery app that runs on the web, iOS, and Android. Not only that, you have also then built the app and deployed it to your users' devices!
diff --git a/docs/angular/zoneless.mdx b/docs/angular/zoneless.mdx
index 90ad3c2bf98..dfe025eadc3 100644
--- a/docs/angular/zoneless.mdx
+++ b/docs/angular/zoneless.mdx
@@ -15,7 +15,7 @@ Angular 21 made [zoneless change detection](https://angular.dev/guide/zoneless)
With Zone.js, Angular automatically re-renders after almost any asynchronous task. Without it, Angular only re-renders when you explicitly tell it the view is out of date. Most of your app keeps working unchanged, but a few patterns that relied on Zone.js need a small adjustment.
-## What keeps working automatically
+## What keeps working automatically {/* #what-keeps-working-automatically */}
You do not need to change these. Angular schedules change detection for them in a zoneless app:
@@ -32,7 +32,7 @@ Angular 22 also makes `OnPush` the default change detection strategy. Under `OnP
:::
-## What needs a notification
+## What needs a notification {/* #what-needs-a-notification */}
When you update component state from an asynchronous callback that Angular did not wrap, nothing schedules a re-render. The state changes, but the view does not update. This applies to any Angular code, not only Ionic, and the common sources in an Ionic app are:
@@ -43,7 +43,7 @@ When you update component state from an asynchronous callback that Angular did n
You can notify Angular in two ways: write to a [signal](https://angular.dev/guide/signals) that the template reads, or inject `ChangeDetectorRef` and call `markForCheck()` after the update. We recommend signals because they work the same with or without Zone.js.
-### Signals (recommended)
+### Signals (recommended) {/* #signals-recommended */}
Writing a signal that a template reads schedules change detection automatically, so there is nothing extra to remember after the update.
@@ -74,7 +74,7 @@ export class HomePage {
}
```
-### `ChangeDetectorRef.markForCheck()`
+### `ChangeDetectorRef.markForCheck()` {/* #changedetectorrefmarkforcheck */}
If you are not using signals for a particular piece of state, inject `ChangeDetectorRef` and call `markForCheck()` after the asynchronous update. It is a no-op-or-better under Zone.js, so it is safe to leave in place if you later re-enable zones.
@@ -101,11 +101,11 @@ export class ListPage {
}
```
-## Common Ionic patterns
+## Common Ionic patterns {/* #common-ionic-patterns */}
These apply the two approaches above to patterns you are likely to hit in an Ionic app.
-### Inline overlays with dynamic content
+### Inline overlays with dynamic content {/* #inline-overlays-with-dynamic-content */}
Content projected into an inline `ion-modal` or `ion-popover` follows the same rule. If you populate it asynchronously, update a signal or call `markForCheck()`:
@@ -136,7 +136,7 @@ export class InlinePage {
Inline overlays also expose their events as outputs (for example `ionModalDidDismiss`), which you can convert to a signal with [`toSignal`](https://angular.dev/api/core/rxjs-interop/toSignal) if you prefer a reactive style.
-### Platform events
+### Platform events {/* #platform-events */}
`Platform` exposes its events as RxJS subjects. Update a signal inside the subscription so the view reflects the change:
@@ -153,7 +153,7 @@ export class AppComponent {
}
```
-## Change detection on Angular 22
+## Change detection on Angular 22 {/* #change-detection-on-angular-22 */}
On Angular 22 a component that does not declare a strategy is `OnPush`. If your pages keep state in plain fields rather than signals, every component from your application root down to the one hosting `ion-router-outlet` or `ion-tabs` (your app shell) must stay eager. A tick starts at the application root and skips a clean `OnPush` view and everything below it, so an `OnPush` ancestor strands the page even when the page itself is eager:
@@ -172,6 +172,6 @@ If other components sit between your application root and `ion-router-outlet`, e
Hosting an `ion-nav` is fine either way, because its pages are attached as root views and are checked independently of the component hosting them.
-## Staying on Zone.js
+## Staying on Zone.js {/* #staying-on-zonejs */}
If you are not ready to adopt zoneless change detection, you can opt back into Zone.js with `provideZoneChangeDetection()`. Refer to the [Keeping Zone.js section of the Ionic 9 upgrade guide](/updating/9-0.mdx#keeping-zonejs) for the exact configuration.
diff --git a/docs/api/accordion-group.mdx b/docs/api/accordion-group.mdx
index e5ac64dc415..d189bcaa776 100644
--- a/docs/api/accordion-group.mdx
+++ b/docs/api/accordion-group.mdx
@@ -17,9 +17,9 @@ Accordion group is a container for accordion instances. It manages the state of
Refer to the [Accordion](./accordion) documentation for more information.
-## Interfaces
+## Interfaces {/* #interfaces */}
-### AccordionGroupChangeEventDetail
+### AccordionGroupChangeEventDetail {/* #accordiongroupchangeeventdetail */}
```typescript
interface AccordionGroupChangeEventDetail {
@@ -27,7 +27,7 @@ interface AccordionGroupChangeEventDetail {
}
```
-### AccordionGroupCustomEvent
+### AccordionGroupCustomEvent {/* #accordiongroupcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
@@ -38,26 +38,26 @@ interface AccordionGroupCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/accordion.mdx b/docs/api/accordion.mdx
index 8d301027b52..283424b0f97 100644
--- a/docs/api/accordion.mdx
+++ b/docs/api/accordion.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Accordions provide collapsible sections in your content to reduce vertical space while providing a way of organizing and grouping information. All `ion-accordion` components should be grouped inside `ion-accordion-group` components.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/accordion/basic/index.mdx';
-## Toggle Accordions
+## Toggle Accordions {/* #toggle-accordions */}
Which accordion is open is controlled by setting the `value` property on `ion-accordion-group`. Setting this property allows developers to programmatically expand or collapse certain accordions.
@@ -37,7 +37,7 @@ import Toggle from '@site/static/usage/v10/accordion/toggle/index.mdx';
-## Listen for Accordion State Changes
+## Listen for Accordion State Changes {/* #listen-for-accordion-state-changes */}
:::caution
@@ -53,7 +53,7 @@ import ListenChanges from '@site/static/usage/v10/accordion/listen-changes/index
-## Multiple Accordions
+## Multiple Accordions {/* #multiple-accordions */}
Developers can allow multiple accordions to be open at once with the `multiple` property.
@@ -61,9 +61,9 @@ import Multiple from '@site/static/usage/v10/accordion/multiple/index.mdx';
-## Disabling Accordions
+## Disabling Accordions {/* #disabling-accordions */}
-### Individual Accordion
+### Individual Accordion {/* #individual-accordion */}
Individual accordions can be disabled with the `disabled` property on `ion-accordion`.
@@ -71,7 +71,7 @@ import DisableIndividual from '@site/static/usage/v10/accordion/disable/individu
-### Accordion Group
+### Accordion Group {/* #accordion-group */}
The accordion group can be disabled with the `disabled` property on `ion-accordion-group`.
@@ -79,9 +79,9 @@ import DisableGroup from '@site/static/usage/v10/accordion/disable/group/index.m
-## Readonly Accordions
+## Readonly Accordions {/* #readonly-accordions */}
-### Individual Accordion
+### Individual Accordion {/* #individual-accordion-1 */}
Individual accordions can be disabled with the `readonly` property on `ion-accordion`.
@@ -89,7 +89,7 @@ import ReadonlyIndividual from '@site/static/usage/v10/accordion/readonly/indivi
-### Accordion Group
+### Accordion Group {/* #accordion-group-1 */}
The accordion group can be disabled with the `readonly` property on `ion-accordion-group`.
@@ -97,21 +97,21 @@ import ReadonlyGroup from '@site/static/usage/v10/accordion/readonly/group/index
-## Anatomy
+## Anatomy {/* #anatomy */}
-### Header
+### Header {/* #header */}
The `header` slot is used as the toggle that will expand or collapse your accordion. We recommend you use an `ion-item` here to take advantage of the accessibility and theming functionalities.
When using `ion-item` in the `header` slot, the `ion-item`'s `button` prop is set to `true` and the `detail` prop is set to `false`. In addition, we will also automatically add a toggle icon to the `ion-item`. This icon will automatically be rotated when you expand or collapse the accordion. Refer to [Customizing Icons](#icons) for more information.
-### Content
+### Content {/* #content */}
The `content` slot is used as the part of the accordion that is revealed or hidden depending on the state of your accordion. You can place anything here except for another `ion-content` instance as only one instance of `ion-content` should be added per page.
-## Customization
+## Customization {/* #customization */}
-### Expansion Styles
+### Expansion Styles {/* #expansion-styles */}
There are two built in expansion styles: `compact` and `inset`. This expansion style is set via the `expand` property on `ion-accordion-group`.
@@ -121,7 +121,7 @@ import ExpansionStyles from '@site/static/usage/v10/accordion/customization/expa
-### Advanced Expansion Styles
+### Advanced Expansion Styles {/* #advanced-expansion-styles */}
You can customize the expansion behavior by styling based on the accordion's state. There are four state classes applied to `ion-accordion`. Styling using these classes can allow you to create advanced state transitions:
@@ -145,7 +145,7 @@ import AdvancedExpansionStyles from '@site/static/usage/v10/accordion/customizat
-### Icons
+### Icons {/* #icons */}
When using an `ion-item` in the `header` slot, we automatically add an `ion-icon`. The type of icon used can be controlled by the `toggleIcon` property, and the slot it is added to can be controlled with the `toggleIconSlot` property.
@@ -157,7 +157,7 @@ import Icons from '@site/static/usage/v10/accordion/customization/icons/index.md
-### Theming
+### Theming {/* #theming */}
Since `ion-accordion` acts as a shell around the header and content elements, you can easily theme the accordion however you would like. You can theme the header by targeting the slotted `ion-item`. Since you are using `ion-item`, you also have access to all of the [ion-item CSS Variables](./item#css-custom-properties) and [ion-item Shadow Parts](./item#css-shadow-parts). Theming the content is also easily achieved by targeting the element that is in the `content` slot.
@@ -165,9 +165,9 @@ import Theming from '@site/static/usage/v10/accordion/customization/theming/inde
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Animations
+### Animations {/* #animations */}
By default, animations are enabled when expanding or collapsing an accordion item. Animations will be automatically disabled when the `prefers-reduced-motion` media query is supported and set to `reduce`. For browsers that do not support this, animations can be disabled by setting the `animated` config in your Ionic Framework app.
@@ -175,7 +175,7 @@ import AccessibilityAnimations from '@site/static/usage/v10/accordion/accessibil
-### Keyboard Interactions
+### Keyboard Interactions {/* #keyboard-interactions */}
When used inside an `ion-accordion-group`, `ion-accordion` has full keyboard support for interacting with the component. The following table details what each key does:
@@ -189,9 +189,9 @@ When used inside an `ion-accordion-group`, `ion-accordion` has full keyboard sup
| Home | When focus is on an accordion header, moves focus to the first accordion header. |
| End | When focus is on an accordion header, moves focus to the last accordion header. |
-## Performance
+## Performance {/* #performance */}
-### Animations
+### Animations {/* #animations-1 */}
The accordion animation works by knowing the height of the `content` slot when the animation starts. The accordion expects that this height will remain consistent throughout the animation. As a result, developers should avoid performing any operation that may change the height of the content during the animation.
@@ -203,26 +203,26 @@ For example, lazily loading images may cause layout shifts as they load. As the
3. If neither of these options are applicable, developers may want to consider disabling animations altogether by using the `animated` property on [ion-accordion-group](./accordion-group).
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/action-sheet.mdx b/docs/api/action-sheet.mdx
index 18c4e844df4..bda3e8bc307 100644
--- a/docs/api/action-sheet.mdx
+++ b/docs/api/action-sheet.mdx
@@ -26,7 +26,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
An Action Sheet is a dialog that displays a set of options. It appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. Destructive options are made obvious in `ios` mode. There are multiple ways to dismiss the action sheet, including tapping the backdrop or hitting the escape key on desktop.
-## Inline Action Sheets (Recommended)
+## Inline Action Sheets (Recommended) {/* #inline-action-sheets-recommended */}
`ion-action-sheet` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the Action Sheet.
@@ -34,7 +34,7 @@ import Trigger from '@site/static/usage/v10/action-sheet/inline/trigger/index.md
-### Using `isOpen`
+### Using `isOpen` {/* #using-isopen */}
The `isOpen` property on `ion-action-sheet` allows developers to control the presentation state of the Action Sheet from their application state. This means when `isOpen` is set to `true` the Action Sheet will be presented, and when `isOpen` is set to `false` the Action Sheet will be dismissed.
@@ -44,7 +44,7 @@ import IsOpen from '@site/static/usage/v10/action-sheet/inline/isOpen/index.mdx'
-## Controller Action Sheets
+## Controller Action Sheets {/* #controller-action-sheets */}
The `actionSheetController` can be used in situations where more control is needed over when the Action Sheet is presented and dismissed.
@@ -52,13 +52,13 @@ import Controller from '@site/static/usage/v10/action-sheet/controller/index.mdx
-## Buttons
+## Buttons {/* #buttons */}
A button's `role` property can either be `destructive` or `cancel`. Buttons without a role property will have the default look for the platform. Buttons with the `cancel` role will always load as the bottom button, no matter where they are in the array. All other buttons will be displayed in the order they have been added to the `buttons` array. Note: We recommend that `destructive` buttons are always the first button in the array, making them the top button. Additionally, if the action sheet is dismissed by tapping the backdrop, then it will fire the handler from the button with the cancel role.
A button can also be passed data via the `data` property on `ActionSheetButton`. This will populate the `data` field in the return value of the `onDidDismiss` method.
-## Collecting Role Information on Dismiss
+## Collecting Role Information on Dismiss {/* #collecting-role-information-on-dismiss */}
When the `didDismiss` event is fired, the `data` and `role` fields of the event detail can be used to gather information about how the Action Sheet was dismissed.
@@ -66,11 +66,11 @@ import RoleInfo from '@site/static/usage/v10/action-sheet/role-info-on-dismiss/i
-## Theming
+## Theming {/* #theming */}
Action Sheet uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector.
-### Styling
+### Styling {/* #styling */}
We recommend passing a custom class to `cssClass` in the `create` method and using that to add custom styles to the host and inner elements. This property can also accept multiple classes separated by spaces.
@@ -90,7 +90,7 @@ import Styling from '@site/static/usage/v10/action-sheet/theming/styling/index.m
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
Any of the defined [CSS Custom Properties](#css-custom-properties-1) can be used to style the Action Sheet without needing to target individual elements.
@@ -98,17 +98,17 @@ import CssCustomProperties from '@site/static/usage/v10/action-sheet/theming/css
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Screen Readers
+### Screen Readers {/* #screen-readers */}
Action Sheets set aria properties in order to be [accessible](../reference/glossary#a11y) to screen readers, but these properties can be overridden if they aren't descriptive enough or don't align with how the action sheet is being used in an app.
-#### Role
+#### Role {/* #role */}
Action Sheets are given a `role` of [`dialog`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/dialog_role). In order to align with the ARIA spec, either the `aria-label` or `aria-labelledby` attribute must be set.
-#### Action Sheet Description
+#### Action Sheet Description {/* #action-sheet-description */}
It is strongly recommended that every Action Sheet have the `header` property defined, as Ionic will automatically set `aria-labelledby` to point to the header element. However, if you choose not to include a `header`, an alternative is to use the `htmlAttributes` property to provide a descriptive `aria-label` or set a custom `aria-labelledby` value.
@@ -164,7 +164,7 @@ const actionSheet = await actionSheetController.create({
-#### Action Sheet Buttons Description
+#### Action Sheet Buttons Description {/* #action-sheet-buttons-description */}
Buttons containing text will be read by a screen reader. If a button contains only an icon, or a description other than the existing text is desired, a label should be assigned to the button by passing `aria-label` to the `htmlAttributes` property on the button.
@@ -244,9 +244,9 @@ const actionSheet = await actionSheetController.create({
-## Interfaces
+## Interfaces {/* #interfaces */}
-### ActionSheetButton
+### ActionSheetButton {/* #actionsheetbutton */}
```typescript
interface ActionSheetButton {
@@ -261,7 +261,7 @@ interface ActionSheetButton {
}
```
-### ActionSheetOptions
+### ActionSheetOptions {/* #actionsheetoptions */}
```typescript
interface ActionSheetOptions {
@@ -282,26 +282,26 @@ interface ActionSheetOptions {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/alert.mdx b/docs/api/alert.mdx
index d68636539ed..678cd99e014 100644
--- a/docs/api/alert.mdx
+++ b/docs/api/alert.mdx
@@ -26,7 +26,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
An Alert is a dialog that presents users with information or collects information from the user using inputs. An alert appears on top of the app's content, and must be manually dismissed by the user before they can resume interaction with the app. It can also optionally have a `header`, `subHeader` and `message`.
-## Inline Alerts (Recommended)
+## Inline Alerts (Recommended) {/* #inline-alerts-recommended */}
`ion-alert` can be used by writing the component directly in your template. This reduces the number of handlers you need to wire up in order to present the Alert.
@@ -34,7 +34,7 @@ import Trigger from '@site/static/usage/v10/alert/presenting/trigger/index.mdx';
-### Using `isOpen`
+### Using `isOpen` {/* #using-isopen */}
The `isOpen` property on `ion-alert` allows developers to control the presentation state of the Alert from their application state. This means when `isOpen` is set to `true` the Alert will be presented, and when `isOpen` is set to `false` the Alert will be dismissed.
@@ -44,7 +44,7 @@ import IsOpen from '@site/static/usage/v10/alert/presenting/isOpen/index.mdx';
-## Controller Alerts
+## Controller Alerts {/* #controller-alerts */}
The `alertController` can be used in situations where more control is needed over when the Alert is presented and dismissed.
@@ -52,7 +52,7 @@ import Controller from '@site/static/usage/v10/alert/presenting/controller/index
-## Buttons
+## Buttons {/* #buttons */}
In the array of `buttons`, each button includes properties for its `text`, and optionally a `handler`. If a handler returns `false` then the alert will not automatically be dismissed when the button is clicked. All buttons will show up in the order they have been added to the `buttons` array from left to right. Note: The right most button (the last one in the array) is the main button.
@@ -62,23 +62,23 @@ import Buttons from '@site/static/usage/v10/alert/buttons/index.mdx';
-## Inputs
+## Inputs {/* #inputs */}
Alerts can also include several different inputs whose data can be passed back to the app. Inputs can be used as a simple way to prompt users for information. Radios, checkboxes and text inputs are all accepted, but they cannot be mixed. For example, an alert could have all radio button inputs, or all checkbox inputs, but the same alert cannot mix radio and checkbox inputs. Do note however, different types of "text" inputs can be mixed, such as `url`, `email`, `text`, `textarea` etc. If you require a complex form UI which doesn't fit within the guidelines of an alert then we recommend building the form within a modal instead.
-### Text Inputs Example
+### Text Inputs Example {/* #text-inputs-example */}
import TextInputs from '@site/static/usage/v10/alert/inputs/text-inputs/index.mdx';
-### Radio Example
+### Radio Example {/* #radio-example */}
import Radios from '@site/static/usage/v10/alert/inputs/radios/index.mdx';
-## Customization
+## Customization {/* #customization */}
Alert uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector.
@@ -114,17 +114,17 @@ If you are building an Ionic Angular app, the styles need to be added to a globa
:::
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Screen Readers
+### Screen Readers {/* #screen-readers */}
Alerts set aria properties in order to be [accessible](../reference/glossary#a11y) to screen readers, but these properties can be overridden if they aren't descriptive enough or don't align with how the alert is being used in an app.
-#### Role
+#### Role {/* #role */}
Ionic automatically sets the Alert's `role` to either [`alertdialog`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alertdialog_role) if there are any inputs or buttons included, or [`alert`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/alert_role) if there are none.
-#### Alert Description
+#### Alert Description {/* #alert-description */}
If the `header` property is defined for the Alert, the `aria-labelledby` attribute will be automatically set to the header's ID. The `subHeader` element will be used as a fallback if `header` is not defined. Similarly, the `aria-describedby` attribute will be automatically set to the ID of the `message` element if that property is defined.
@@ -188,7 +188,7 @@ const alert = await alertController.create({
All ARIA attributes can be manually overwritten by defining custom values in the `htmlAttributes` property of the Alert.
-#### Alert Buttons Description
+#### Alert Buttons Description {/* #alert-buttons-description */}
Buttons containing text will be read by a screen reader. If a description other than the existing text is desired, a label can be set on the button by passing `aria-label` to the `htmlAttributes` property on the button.
@@ -268,9 +268,9 @@ const alert = await alertController.create({
-## Interfaces
+## Interfaces {/* #interfaces */}
-### AlertButton
+### AlertButton {/* #alertbutton */}
```typescript
type AlertButtonOverlayHandler = boolean | void | { [key: string]: any };
@@ -285,7 +285,7 @@ interface AlertButton {
}
```
-### AlertInput
+### AlertInput {/* #alertinput */}
```typescript
interface AlertInput {
@@ -309,7 +309,7 @@ interface AlertInput {
}
```
-### AlertOptions
+### AlertOptions {/* #alertoptions */}
```typescript
interface AlertOptions {
@@ -333,26 +333,26 @@ interface AlertOptions {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/app.mdx b/docs/api/app.mdx
index 7614a5374b4..8fb575dbcd8 100644
--- a/docs/api/app.mdx
+++ b/docs/api/app.mdx
@@ -30,7 +30,7 @@ Using `ion-app` enables the following behaviors:
- [Ripple effect](./ripple-effect) when activating buttons on Material Design mode
- Other tap and focus utilities which make the experience of using an Ionic app feel more native
-## Programmatic Focus
+## Programmatic Focus {/* #programmatic-focus */}
Ionic offers focus utilities for components with the `ion-focusable` class. These utilities automatically manage focus for components when certain keyboard keys, like Tab, are pressed. Components can also be programmatically focused in response to user actions using the `setFocus` method from `ion-app`.
@@ -38,26 +38,26 @@ import SetFocus from '@site/static/usage/v10/app/set-focus/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/avatar.mdx b/docs/api/avatar.mdx
index b1449c19baa..db51aa49fef 100644
--- a/docs/api/avatar.mdx
+++ b/docs/api/avatar.mdx
@@ -25,52 +25,52 @@ Avatars are circular components that usually wrap an image or icon. They can be
Avatars can be used by themselves or inside of any element. If placed inside of an `ion-chip` or `ion-item`, the avatar will resize to fit the parent component. To position an avatar on the left or right side of an item, set the slot to `start` or `end`, respectively.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/avatar/basic/index.mdx';
-## Chip Avatar
+## Chip Avatar {/* #chip-avatar */}
import Chip from '@site/static/usage/v10/avatar/chip/index.mdx';
-## Item Avatar
+## Item Avatar {/* #item-avatar */}
import Item from '@site/static/usage/v10/avatar/item/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/avatar/theming/css-properties/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/back-button.mdx b/docs/api/back-button.mdx
index 25d11285181..92f12d27288 100644
--- a/docs/api/back-button.mdx
+++ b/docs/api/back-button.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The back button navigates back in the app's history when clicked. It is only displayed when there is history in the navigation stack, unless [`defaultHref`](#default-back-history) is set. The back button displays different text and icon based on the mode, but this can be customized.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/back-button/basic/index.mdx';
-## Custom Back Button
+## Custom Back Button {/* #custom-back-button */}
By default, the back button will display the text `"Back"` with a `"chevron-back"` icon on `ios`, and an `"arrow-back-sharp"` icon on `md`. This can be customized per back button component by setting the `icon` or `text` properties. Alternatively, it can be set globally using the `backButtonIcon` or `backButtonText` properties in the global config. Refer to the [Config docs](../developing/config) for more information.
@@ -37,30 +37,30 @@ import Custom from '@site/static/usage/v10/back-button/custom/index.mdx';
-## Default Back History
+## Default Back History {/* #default-back-history */}
Occasionally an app may need to show the back button and navigate back when there is no history. This can be done by setting the `defaultHref` on the back button to a path. In order to use `defaultHref`, the app must contain a router with paths set.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/backdrop.mdx b/docs/api/backdrop.mdx
index 02c5e0cbd26..1c7a2dd6c5f 100644
--- a/docs/api/backdrop.mdx
+++ b/docs/api/backdrop.mdx
@@ -15,7 +15,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Backdrops are full screen components that overlay other components. They are useful behind components that transition in on top of other content and can be used to dismiss that component.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
The backdrop prevents clicking or tapping on the content behind it. It is transparent by default, so the below demo includes CSS to make it visible.
@@ -23,7 +23,7 @@ import Basic from '@site/static/usage/v10/backdrop/basic/index.mdx';
-## Styling
+## Styling {/* #styling */}
The backdrop can be customized by assigning CSS properties directly to the backdrop element. Common properties include `background-color`, `background` and `opacity`.
@@ -33,26 +33,26 @@ import Styling from '@site/static/usage/v10/backdrop/styling/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/badge.mdx b/docs/api/badge.mdx
index c5fccb26d80..dd6110a889e 100644
--- a/docs/api/badge.mdx
+++ b/docs/api/badge.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Badges are inline block elements that usually appear near another element. Typically they contain a number or other characters. They can be used as a notification that there are additional items associated with an element and indicate how many items there are. Badges are hidden if no content is passed in.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/badge/basic/index.mdx';
-## Badges in Tab Buttons
+## Badges in Tab Buttons {/* #badges-in-tab-buttons */}
Badges can be added inside a tab button, often used to indicate notifications or highlight additional items associated with the element.
@@ -43,40 +43,40 @@ import InsideTabBar from '@site/static/usage/v10/badge/inside-tab-bar/index.mdx'
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/badge/theming/colors/index.mdx';
-### CSS Properties
+### CSS Properties {/* #css-properties */}
import CSSProps from '@site/static/usage/v10/badge/theming/css-properties/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/breadcrumb.mdx b/docs/api/breadcrumb.mdx
index 49da6c7e669..c9bfbb868a9 100644
--- a/docs/api/breadcrumb.mdx
+++ b/docs/api/breadcrumb.mdx
@@ -17,9 +17,9 @@ A Breadcrumb is a single navigation item that is a child of the Breadcrumbs comp
Refer to the [Breadcrumbs](./breadcrumbs) documentation for more information.
-## Interfaces
+## Interfaces {/* #interfaces */}
-### BreadcrumbCollapsedClickEventDetail
+### BreadcrumbCollapsedClickEventDetail {/* #breadcrumbcollapsedclickeventdetail */}
```typescript
interface BreadcrumbCollapsedClickEventDetail {
@@ -27,7 +27,7 @@ interface BreadcrumbCollapsedClickEventDetail {
}
```
-### BreadcrumbCustomEvent
+### BreadcrumbCustomEvent {/* #breadcrumbcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing .
@@ -38,26 +38,26 @@ interface BreadcrumbCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/breadcrumbs.mdx b/docs/api/breadcrumbs.mdx
index f1ddd018be5..b1b6e4cb72a 100644
--- a/docs/api/breadcrumbs.mdx
+++ b/docs/api/breadcrumbs.mdx
@@ -15,29 +15,29 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Breadcrumbs are navigation items that are used to indicate where a user is on an app or site. They should be used for large sites and apps with hierarchically arranged pages. Breadcrumbs can be collapsed based on the maximum number that can show, and the collapsed indicator can be clicked on to present a popover with more information or expand the collapsed breadcrumbs.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/breadcrumbs/basic/index.mdx';
-## Using Icons
+## Using Icons {/* #using-icons */}
-### Icons on Items
+### Icons on Items {/* #icons-on-items */}
import IconsOnItems from '@site/static/usage/v10/breadcrumbs/icons/icons-on-items/index.mdx';
-### Custom Separators
+### Custom Separators {/* #custom-separators */}
import CustomSeparators from '@site/static/usage/v10/breadcrumbs/icons/custom-separators/index.mdx';
-## Collapsing Items
+## Collapsing Items {/* #collapsing-items */}
-### Max Items
+### Max Items {/* #max-items */}
If there are more items than the value of `maxItems`, the breadcrumbs will be collapsed. By default, only the first and last items will be shown.
@@ -45,7 +45,7 @@ import MaxItems from '@site/static/usage/v10/breadcrumbs/collapsing-items/max-it
-### Items Before or After Collapse
+### Items Before or After Collapse {/* #items-before-or-after-collapse */}
Once the items are collapsed, the number of items to show can be controlled by the `itemsBeforeCollapse` and `itemsAfterCollapse` properties.
@@ -53,7 +53,7 @@ import ItemsBeforeAfter from '@site/static/usage/v10/breadcrumbs/collapsing-item
-### Collapsed Indicator Click -- Expand Breadcrumbs
+### Collapsed Indicator Click -- Expand Breadcrumbs {/* #collapsed-indicator-click----expand-breadcrumbs */}
Clicking the collapsed indicator will fire the `ionCollapsedClick` event. This can be used to, for example, expand the breadcrumbs.
@@ -61,7 +61,7 @@ import ExpandOnClick from '@site/static/usage/v10/breadcrumbs/collapsing-items/e
-### Collapsed Indicator Click -- Present Popover
+### Collapsed Indicator Click -- Present Popover {/* #collapsed-indicator-click----present-popover */}
The `ionCollapsedClick` event can also be used to present an overlay (in this case, an `ion-popover`) showing the hidden breadcrumbs.
@@ -69,40 +69,40 @@ import PopoverOnClick from '@site/static/usage/v10/breadcrumbs/collapsing-items/
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/breadcrumbs/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/breadcrumbs/theming/css-properties/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/button.mdx b/docs/api/button.mdx
index 3a446968cf2..93c34fd2dd0 100644
--- a/docs/api/button.mdx
+++ b/docs/api/button.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Buttons provide a clickable element, which can be used in forms, or anywhere that needs simple, standard button functionality. They may display text, icons, or both. Buttons can be styled with several attributes to look a specific way.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/button/basic/index.mdx';
-## Expand
+## Expand {/* #expand */}
This property lets you specify how wide the button should be. By default, buttons have `display: inline-block`, but setting this property will change the button to a full-width element with `display: block`.
@@ -37,7 +37,7 @@ import Expand from '@site/static/usage/v10/button/expand/index.mdx';
-## Shape
+## Shape {/* #shape */}
This property lets you specify the shape of the button. By default, buttons are rectangular with a small border radius, but setting this to `"round"` will change the button to a rounded element.
@@ -45,7 +45,7 @@ import Shape from '@site/static/usage/v10/button/shape/index.mdx';
-## Fill
+## Fill {/* #fill */}
This property determines the background and border color of the button. By default, buttons have a solid background unless the button is inside of a toolbar, in which case it has a transparent background.
@@ -53,7 +53,7 @@ import Fill from '@site/static/usage/v10/button/fill/index.mdx';
-## Size
+## Size {/* #size */}
This property specifies the size of the button. Setting this property will change the height and padding of a button.
@@ -61,31 +61,31 @@ import Size from '@site/static/usage/v10/button/size/index.mdx';
-## Icons
+## Icons {/* #icons */}
import Icons from '@site/static/usage/v10/button/icons/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/button/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/button/theming/css-properties/index.mdx';
-## Accessibility
+## Accessibility {/* #accessibility */}
Buttons are built to be accessible, but may need some adjustments depending on their content. The button component renders a native [button element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button) which allows it to take advantage of the functionality that a native button provides.
-### Overflowing Text Content
+### Overflowing Text Content {/* #overflowing-text-content */}
There are many cases where a button's text content may overflow the container. It is recommended to wrap the text inside of the button when this happens so that all of the text can still be read. The button component will automatically adjust its height to accommodate the extra lines of text.
@@ -101,26 +101,26 @@ import TextWrapping from '@site/static/usage/v10/button/text-wrapping/index.mdx'
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/buttons.mdx b/docs/api/buttons.mdx
index 7371cf50bb0..2fa0e42d5be 100644
--- a/docs/api/buttons.mdx
+++ b/docs/api/buttons.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The Buttons component is a container element. It should be used inside of a [toolbar](./toolbar) and can contain several types of buttons, including standard [buttons](./button), [menu buttons](./menu-button), and [back buttons](./back-button).
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/buttons/basic/index.mdx';
-## Buttons Placement
+## Buttons Placement {/* #buttons-placement */}
Buttons can be positioned inside of the toolbar using a named slot. The below chart has a description of each slot.
@@ -44,7 +44,7 @@ import Placement from '@site/static/usage/v10/buttons/placement/index.mdx';
-## Types of Buttons
+## Types of Buttons {/* #types-of-buttons */}
A button in a toolbar is styled to be clear by default, but this can be changed using the [`fill`](./button#fill) property on the button. The properties included on [back button](./back-button) and [menu button](./menu-button) in this example are for display purposes; refer to their respective documentation for proper usage.
@@ -52,7 +52,7 @@ import Types from '@site/static/usage/v10/buttons/types/index.mdx';
-## Collapsible Buttons
+## Collapsible Buttons {/* #collapsible-buttons */}
The `collapse` property can be set on the buttons to collapse them when the header collapses. This is typically used with [collapsible large titles](./title#collapsible-large-titles).
@@ -67,26 +67,26 @@ import CollapsibleLargeTitleButtons from '@site/static/usage/v10/title/collapsib
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/card-content.mdx b/docs/api/card-content.mdx
index 3bbaa700990..5f09c7a2c72 100644
--- a/docs/api/card-content.mdx
+++ b/docs/api/card-content.mdx
@@ -15,26 +15,26 @@ Card content is a child component of card that adds padding around its contents.
Refer to the [Card](./card) documentation for more information.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/card-header.mdx b/docs/api/card-header.mdx
index c00364e877b..0721c076932 100644
--- a/docs/api/card-header.mdx
+++ b/docs/api/card-header.mdx
@@ -17,26 +17,26 @@ Card header is a child component of card that should be placed before the card c
Refer to the [Card](./card) documentation for more information.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/card-subtitle.mdx b/docs/api/card-subtitle.mdx
index 2418b28e4a2..bf5f8ae884e 100644
--- a/docs/api/card-subtitle.mdx
+++ b/docs/api/card-subtitle.mdx
@@ -17,26 +17,26 @@ Card subtitle is a child component of card that should be placed inside of a [ca
Refer to the [Card](./card) documentation for more information.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/card-title.mdx b/docs/api/card-title.mdx
index fa1be55ba35..5c739b7fe2b 100644
--- a/docs/api/card-title.mdx
+++ b/docs/api/card-title.mdx
@@ -25,26 +25,26 @@ Card title is a child component of card that should be placed inside of a [card
Refer to the [Card](./card) documentation for more information.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/card.mdx b/docs/api/card.mdx
index 35cee7e72c9..dea028d0216 100644
--- a/docs/api/card.mdx
+++ b/docs/api/card.mdx
@@ -27,64 +27,64 @@ and content. Cards are broken up into several components to accommodate this str
[card header](./card-header), [card title](./card-title), [card subtitle](./card-subtitle),
and [card content](./card-content).
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/card/basic/index.mdx';
-## Media Cards
+## Media Cards {/* #media-cards */}
import Media from '@site/static/usage/v10/card/media/index.mdx';
-## Card Buttons
+## Card Buttons {/* #card-buttons */}
import Buttons from '@site/static/usage/v10/card/buttons/index.mdx';
-## List Card
+## List Card {/* #list-card */}
import List from '@site/static/usage/v10/card/list/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/card/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/card/theming/css-properties/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/checkbox.mdx b/docs/api/checkbox.mdx
index b513f1bb7ce..3add1427354 100644
--- a/docs/api/checkbox.mdx
+++ b/docs/api/checkbox.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Checkboxes allow the selection of multiple options from a set of options. They appear as checked (ticked) when activated. Clicking on a checkbox will toggle the `checked` property. They can also be checked programmatically by setting the `checked` property.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/checkbox/basic/index.mdx';
-## Label Placement
+## Label Placement {/* #label-placement */}
Developers can use the `labelPlacement` property to control how the label is placed relative to the control. This property mirrors the flexbox `flex-direction` property.
@@ -37,7 +37,7 @@ import LabelPlacement from '@site/static/usage/v10/checkbox/label-placement/inde
-## Alignment
+## Alignment {/* #alignment */}
Developers can use the `alignment` property to control how the label and control are aligned on the cross axis. This property mirrors the flexbox `align-items` property.
@@ -51,7 +51,7 @@ import Alignment from '@site/static/usage/v10/checkbox/alignment/index.mdx';
-## Justification
+## Justification {/* #justification */}
Developers can use the `justify` property to control how the label and control are packed on a line. This property mirrors the flexbox `justify-content` property.
@@ -65,13 +65,13 @@ import Justify from '@site/static/usage/v10/checkbox/justify/index.mdx';
:::
-## Indeterminate Checkboxes
+## Indeterminate Checkboxes {/* #indeterminate-checkboxes */}
import Indeterminate from '@site/static/usage/v10/checkbox/indeterminate/index.mdx';
-## Links inside of Labels
+## Links inside of Labels {/* #links-inside-of-labels */}
Checkbox labels can sometimes be accompanied with links. These links can provide more information related to the checkbox. However, clicking the link should not check the checkbox. To achieve this, we can use [stopPropagation](https://developer.mozilla.org/en-US/docs/Web/API/Event/stopPropagation) to prevent the click event from bubbling. When using this approach, the rest of the label still remains clickable.
@@ -79,7 +79,7 @@ import LabelLink from '@site/static/usage/v10/checkbox/label-link/index.mdx';
-## Helper & Error Text
+## Helper & Error Text {/* #helper--error-text */}
Helper and error text can be used inside of a checkbox with the `helperText` and `errorText` property. The error text will not be displayed unless the `ion-invalid` and `ion-touched` classes are added to the `ion-checkbox`. This ensures errors are not shown before the user has a chance to enter data.
@@ -89,17 +89,17 @@ import HelperError from '@site/static/usage/v10/checkbox/helper-error/index.mdx'
-## Theming
+## Theming {/* #theming */}
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/checkbox/theming/css-properties/index.mdx';
-## Interfaces
+## Interfaces {/* #interfaces */}
-### CheckboxChangeEventDetail
+### CheckboxChangeEventDetail {/* #checkboxchangeeventdetail */}
```typescript
interface CheckboxChangeEventDetail {
@@ -108,7 +108,7 @@ interface CheckboxChangeEventDetail {
}
```
-### CheckboxCustomEvent
+### CheckboxCustomEvent {/* #checkboxcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
@@ -119,26 +119,26 @@ interface CheckboxCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/chip.mdx b/docs/api/chip.mdx
index 47ffef5f9e2..679e61aa5e4 100644
--- a/docs/api/chip.mdx
+++ b/docs/api/chip.mdx
@@ -23,52 +23,52 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Chips represent complex entities in small blocks, such as a contact. A chip can contain several different elements such as avatars, text, and icons.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/chip/basic/index.mdx';
-## Slotting Components and Icons
+## Slotting Components and Icons {/* #slotting-components-and-icons */}
import SlotExample from '@site/static/usage/v10/chip/slots/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/chip/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/chip/theming/css-properties/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/col.mdx b/docs/api/col.mdx
index 3f15a7ccd05..451020527a6 100644
--- a/docs/api/col.mdx
+++ b/docs/api/col.mdx
@@ -25,30 +25,30 @@ Columns are cellular components of the [grid](./grid) system and go inside of a
Refer to the [grid](./grid) documentation for more information.
-## Column Alignment
+## Column Alignment {/* #column-alignment */}
By default, columns will stretch to fill the entire height of the row. Columns are [flex items](https://developer.mozilla.org/en-US/docs/Glossary/Flex_Item), so there are several [CSS classes](/layout/css-utilities.mdx#flex-item-properties) that can be applied to a column to customize this behavior.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/content.mdx b/docs/api/content.mdx
index 4cb4eb5ac34..d0253d23ba8 100644
--- a/docs/api/content.mdx
+++ b/docs/api/content.mdx
@@ -27,13 +27,13 @@ view.
Content, along with many other Ionic components, can be customized to modify its padding, margin, and more using the global styles provided in the [CSS Utilities](/layout/css-utilities.mdx) or by individually styling it using CSS and the available [CSS Custom Properties](#css-custom-properties).
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/content/basic/index.mdx';
-## Header & Footer
+## Header & Footer {/* #header--footer */}
Content can be the only top-level component in a page, or it can be used alongside a [header](./header), [footer](./footer), or both. When used with a header or footer, it will adjust its size to fill the remaining height.
@@ -41,7 +41,7 @@ import HeaderFooter from '@site/static/usage/v10/content/header-footer/index.mdx
-## Fullscreen Content
+## Fullscreen Content {/* #fullscreen-content */}
By default, content fills the space between a [header](./header) and [footer](./footer) but does not go behind them. In certain cases, it may be desired to have the content scroll behind the header and footer, such as when the `translucent` property is set on either of them, or `opacity` is set on the toolbar. This can be achieved by setting the `fullscreen` property on the content to `true`.
@@ -49,7 +49,7 @@ import Fullscreen from '@site/static/usage/v10/content/fullscreen/index.mdx';
-## Fixed Content
+## Fixed Content {/* #fixed-content */}
To place elements outside of the scrollable area, assign them to the `fixed` slot. Doing so will [absolutely position](https://developer.mozilla.org/en-US/docs/Web/CSS/position#absolute_positioning) the element to the top left of the content. In order to change the position of the element, it can be styled using the [top, right, bottom, and left](https://developer.mozilla.org/en-US/docs/Web/CSS/position) CSS properties.
@@ -59,7 +59,7 @@ import Fixed from '@site/static/usage/v10/content/fixed/index.mdx';
-## Scroll Methods
+## Scroll Methods {/* #scroll-methods */}
Content provides [methods](#methods) that can be called to scroll the content to the bottom, top, or to a specific point. They can be passed a `duration` in order to smoothly transition instead of instantly changing the position.
@@ -67,7 +67,7 @@ import ScrollMethods from '@site/static/usage/v10/content/scroll-methods/index.m
-## Scroll Events
+## Scroll Events {/* #scroll-events */}
Scroll events are disabled by default for content due to performance. However, they can be enabled by setting `scrollEvents` to `true`. This is necessary before listening to any of the scroll [events](#events).
@@ -75,27 +75,27 @@ import ScrollEvents from '@site/static/usage/v10/content/scroll-events/index.mdx
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/content/theming/colors/index.mdx';
-### CSS Shadow Parts
+### CSS Shadow Parts {/* #css-shadow-parts */}
import CSSParts from '@site/static/usage/v10/content/theming/css-shadow-parts/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/content/theming/css-properties/index.mdx';
-### Safe Area Padding
+### Safe Area Padding {/* #safe-area-padding */}
The content component will not automatically apply padding to any of its sides to account for the [safe area](/theming/advanced.mdx#safe-area-padding). This is because the content component is often used in conjunction with other components that apply their own padding, such as [headers](./header) and [footers](./footer). However, if the content component is being used on its own, it may be desired to apply padding to the safe area. This can be done through CSS by using the `--ion-safe-area-(dir)` variables described in [Application Variables](../theming/advanced.mdx#application-variables).
@@ -119,9 +119,9 @@ import SafeArea from '@site/static/usage/v10/content/theming/safe-area/index.mdx
-## Interfaces
+## Interfaces {/* #interfaces */}
-### ScrollBaseDetail
+### ScrollBaseDetail {/* #scrollbasedetail */}
```typescript
interface ScrollBaseDetail {
@@ -129,7 +129,7 @@ interface ScrollBaseDetail {
}
```
-### ScrollDetail
+### ScrollDetail {/* #scrolldetail */}
```typescript
interface ScrollDetail extends GestureDetail, ScrollBaseDetail {
@@ -138,7 +138,7 @@ interface ScrollDetail extends GestureDetail, ScrollBaseDetail {
}
```
-### ScrollBaseCustomEvent
+### ScrollBaseCustomEvent {/* #scrollbasecustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing on the `ionScrollStart` and `ionScrollEnd` events.
@@ -149,7 +149,7 @@ interface ScrollBaseCustomEvent extends CustomEvent {
}
```
-### ScrollCustomEvent
+### ScrollCustomEvent {/* #scrollcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing on the `ionScroll` event.
@@ -159,26 +159,26 @@ interface ScrollCustomEvent extends ScrollBaseCustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts-1 */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/datetime-button.mdx b/docs/api/datetime-button.mdx
index abf61fe207d..a8c5eca4f73 100644
--- a/docs/api/datetime-button.mdx
+++ b/docs/api/datetime-button.mdx
@@ -23,23 +23,23 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Datetime Button links with a [Datetime](./datetime) component to display the formatted date and time. It also provides buttons to present the datetime in a modal, popover, and more.
-## Overview
+## Overview {/* #overview */}
Datetime Button should be used when space is constrained. This component displays buttons which show the current date and time values. When the buttons are tapped, the date or time pickers open in the overlay.
When using Datetime Button with a JavaScript framework such as Angular, React, or Vue be sure to use the [keepContentsMounted property on ion-modal](./modal#prop-keep-contents-mounted) or the [keepContentsMounted property on ion-popover](./popover#prop-keep-contents-mounted). This allows the linked datetime instance to be mounted even if the overlay has not been presented yet.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/datetime-button/basic/index.mdx';
-## Localization
+## Localization {/* #localization */}
The localized text on `ion-datetime-button` is determined by the `locale` property on the associated `ion-datetime` instance. Refer to [Datetime Localization](./datetime#localization) for more details.
-## Format Options
+## Format Options {/* #format-options */}
You can customize the format of the date and time in a Datetime Button by providing `formatOptions` on the associated Datetime instance. Refer to [Datetime Format Options](./datetime#format-options) for more details.
@@ -47,30 +47,30 @@ import FormatOptions from '@site/static/usage/v10/datetime-button/format-options
-## Usage with Modals and Popovers
+## Usage with Modals and Popovers {/* #usage-with-modals-and-popovers */}
`ion-datetime-button` must be associated with a mounted `ion-datetime` instance. As a result, [Inline Modals](./modal#inline-modals-recommended) and [Inline Popovers](./popover#inline-popovers) with the `keepContentsMounted` property set to `true` must be used.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/datetime.mdx b/docs/api/datetime.mdx
index f3373cd54e1..f7bcd341417 100644
--- a/docs/api/datetime.mdx
+++ b/docs/api/datetime.mdx
@@ -61,7 +61,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Datetimes present a calendar interface and time wheel, making it easy for users to select dates and times. Datetimes are similar to the native `input` elements of `datetime-local`, however, Ionic Framework's Datetime component makes it easy to display the date and time in the preferred format, and manage the datetime values.
-## Overview
+## Overview {/* #overview */}
Historically, handling datetime values within JavaScript, or even within HTML
inputs, has always been a challenge. Specifically, JavaScript's `Date` object is
@@ -72,7 +72,7 @@ parse various datetime strings differently, especially per locale.
Fortunately, Ionic Framework's datetime input has been designed so developers can avoid
the common pitfalls, allowing developers to easily manipulate datetime values and give the user a simple datetime picker for a great user experience.
-### ISO 8601 Datetime Format: `YYYY-MM-DDTHH:mmZ`
+### ISO 8601 Datetime Format: `YYYY-MM-DDTHH:mmZ` {/* #iso-8601-datetime-format-yyyy-mm-ddthhmmz */}
Ionic Framework uses the [ISO 8601 datetime format](https://www.w3.org/TR/NOTE-datetime)
for its value. The value is simply a string, rather than using JavaScript's
@@ -103,21 +103,21 @@ While seconds, milliseconds, and time zone can be specified using the ISO 8601 d
:::
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
-## Usage with Datetime Button
+## Usage with Datetime Button {/* #usage-with-datetime-button */}
If you need to present a datetime in an overlay such as a modal or a popover, we recommend using [ion-datetime-button](./datetime-button). `ion-datetime-button` should be used when space is constrained. This component displays buttons which show the current date and time values. When the buttons are tapped, the date or time pickers open in the overlay.
-## Setting Values Asynchronously
+## Setting Values Asynchronously {/* #setting-values-asynchronously */}
If its `value` is updated programmatically after a datetime has already been created, the datetime will automatically jump to the new date. However, it is recommended to avoid updating the `value` in this way when users are able to interact with the datetime, as this could be disorienting for those currently trying to select a date. For example, if a datetime's `value` is loaded by an asynchronous process, it is recommended to hide the datetime with CSS until the value has finished updating.
-## Date Constraints
+## Date Constraints {/* #date-constraints */}
-### Max and Min Dates
+### Max and Min Dates {/* #max-and-min-dates */}
To customize the minimum and maximum datetime values, the `min` and `max` component properties can be provided which may make more sense for the app's use-case. Following the same IS0 8601 format listed in the table above, each component can restrict which dates can be selected by the user.
@@ -125,7 +125,7 @@ The following example restricts date selection to March 2022 through May 2022 on
-### Selecting Specific Values
+### Selecting Specific Values {/* #selecting-specific-values */}
While the `min` and `max` properties allow you to restrict date selection to a certain range, the `monthValues`, `dayValues`, `yearValues`, `hourValues`, and `minuteValues` properties allow you choose specific days and times that users can select.
@@ -133,7 +133,7 @@ The following example allows minutes to be selected in increments of 15. It also
-### Advanced Date Constraints
+### Advanced Date Constraints {/* #advanced-date-constraints */}
With the `isDateEnabled` property, developers can customize the `ion-datetime` to disable a specific day, range of dates, weekends or any custom rule using an ISO 8601 date string.
The `isDateEnabled` property accepts a function returning a boolean, indicating if a date is enabled. The function is called for each rendered calendar day, for the previous, current and next month. Custom implementations should be optimized for performance to avoid jank.
@@ -142,11 +142,11 @@ The following example shows how to disable all weekend dates. For more advanced
-## Localization
+## Localization {/* #localization */}
Ionic Framework makes use of the [Intl.DatetimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DatetimeFormat) Web API which allows us to automatically localize the month and day names according to the language and region set on the user's device.
-### Custom Locale
+### Custom Locale {/* #custom-locale */}
For instances where you need a specific locale, you can use the `locale` property to set it. The locale controls both the language and the date and time formats that are displayed.
@@ -160,7 +160,7 @@ The time label is not automatically localized. Refer to [Time Label](#time-label
:::
-### Hour Cycle
+### Hour Cycle {/* #hour-cycle */}
`ion-datetime` will use the hour cycle that is specified by the `locale` property by default. For example, if `locale` is set to `en-US`, then `ion-datetime` will use a 12 hour cycle.
@@ -185,19 +185,19 @@ In the following example, we can use the `hourCycle` property to force `ion-date
-### First Day of the Week
+### First Day of the Week {/* #first-day-of-the-week */}
For `ion-datetime`, the default first day of the week is Sunday. As of 2022, there is no browser API that lets Ionic automatically determine the first day of the week based on a device's locale, though there is on-going work regarding this (refer to [TC39 GitHub](https://github.com/tc39/ecma402/issues/6)).
-### Time Label
+### Time Label {/* #time-label */}
The time label is not automatically localized. Fortunately, Ionic makes it easy to provide custom localizations with the `time-label` slot.
-### Locale Extension Tags
+### Locale Extension Tags {/* #locale-extension-tags */}
`ion-datetime` also supports [locale extension tags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) as part of the `Intl.Locale` API. These tags let you encode information about the locale in the locale string itself. Developers may prefer to use the extension tag approach if they are using the [Intl.Locale API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) in their apps.
@@ -211,13 +211,13 @@ Be sure to check the [Browser Compatibility Chart](https://developer.mozilla.org
:::
-## Presentation
+## Presentation {/* #presentation */}
By default, `ion-datetime` allows users to select both date and time. In addition, users have access to selecting the specific month, year, hour, and minute.
Some use cases may call for only date selection or only time selection. The `presentation` property allows you to specify which pickers to show and the order to show them in. For example, setting `date-time` will have the calendar picker appear before the time picker. Setting `time-date` will have the calendar picker appear after the time picker.
-### Month and Year Selection
+### Month and Year Selection {/* #month-and-year-selection */}
Month and year selection is available by passing `month-year`, `month`, or `year` to the `presentation` property.
@@ -225,7 +225,7 @@ This example shows a datetime with the `month-year` configuration.
-### Time Selection
+### Time Selection {/* #time-selection */}
Time selection is available by passing `date-time`, `time-date`, or `time` to the `presentation` property.
@@ -233,7 +233,7 @@ This example shows a datetime with the `time` configuration.
-### Date Selection
+### Date Selection {/* #date-selection */}
Date selection is available by passing `date-time`, `time-date`, or `date` to the `presentation` property.
@@ -241,7 +241,7 @@ This example shows a datetime with the `date` configuration.
-### Wheel Style Pickers
+### Wheel Style Pickers {/* #wheel-style-pickers */}
By default, Ionic will prefer to show a grid style layout when using `presentation`. However, it is possible to show a wheel style using the `preferWheel` property. When `preferWheel` is `true`, Ionic will prefer to show the wheel style layout when possible.
@@ -263,7 +263,7 @@ import Wheel from '@site/static/usage/v10/datetime/presentation/wheel/index.mdx'
-## Show Adjacent Days
+## Show Adjacent Days {/* #show-adjacent-days */}
If the `showAdjacentDays` property is set to `true`, days from the previous and next month will be displayed in the calendar view to fill any empty spaces at the beginning or end of the month. When a user clicks on an enabled adjacent day, the calendar will smoothly animate to show that month's view.
@@ -277,7 +277,7 @@ This property is only supported when using `presentation="date"` and `preferWhee
-## Multiple Date Selection
+## Multiple Date Selection {/* #multiple-date-selection */}
If the `multiple` property is set to `true`, multiple dates can be selected from the calendar picker. Clicking a selected date will deselect it.
@@ -289,19 +289,19 @@ This property is only supported when using `presentation="date"` and `preferWhee
-## Titles
+## Titles {/* #titles */}
By default, `ion-datetime` does not show any header or title associated with the component. Developers can use the `showDefaultTitle` property to show the default title/header configuration. They can also use the `title` slot to customize what is rendered in the header.
-### Showing the Default Title
+### Showing the Default Title {/* #showing-the-default-title */}
-### Customizing the Title
+### Customizing the Title {/* #customizing-the-title */}
-## Format Options
+## Format Options {/* #format-options */}
You can customize the format of the date in the header text and the time in the time button of a Datetime component by providing `formatOptions`. The `date` and `time` in the `formatOptions` property should each be an [`Intl.DateTimeFormatOptions`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) object. If `formatOptions` is not provided, default formats will be used for dates and times.
@@ -311,23 +311,23 @@ Be careful with the options you provide, as they may not match the selected pres
-## Buttons
+## Buttons {/* #buttons */}
By default, `ionChange` is emitted with the new datetime value whenever a new date is selected. To require user confirmation before emitting `ionChange`, you can either set the `showDefaultButtons` property to `true` or use the `buttons` slot to pass in a custom confirmation button. When passing in custom buttons, the confirm button must call the `confirm` method on `ion-datetime` for `ionChange` to be emitted.
-### Showing Confirmation Buttons
+### Showing Confirmation Buttons {/* #showing-confirmation-buttons */}
The default Done and Cancel buttons are already preconfigured to call the [`confirm`](#method-confirm) and [`cancel`](#method-cancel) methods, respectively.
-### Customizing Button Texts
+### Customizing Button Texts {/* #customizing-button-texts */}
For simple use cases, developers can provide custom button text to the confirmation and cancel values through the `doneText` and `cancelText` properties. We recommend doing this when you only need to change the button text and do not need any custom behavior.
-### Customizing Button Elements
+### Customizing Button Elements {/* #customizing-button-elements */}
Developers can provide their own buttons for advanced custom behavior.
@@ -335,7 +335,7 @@ Developers can provide their own buttons for advanced custom behavior.
-## Highlighting Specific Dates
+## Highlighting Specific Dates {/* #highlighting-specific-dates */}
Using the `highlightedDates` property, developers can style particular dates with custom text or background colors. This property can be defined as either an array of dates and their colors, or a callback that receives an ISO string and returns the colors to use.
@@ -349,21 +349,21 @@ This property is only supported when `preferWheel="false"`, and using a `present
:::
-### Using Array
+### Using Array {/* #using-array */}
An array is better when the highlights apply to fixed dates, such as due dates.
-### Using Callback
+### Using Callback {/* #using-callback */}
A callback is better when the highlighted dates are recurring, such as birthdays or recurring meetings.
-## Styling
+## Styling {/* #styling */}
-### Global Theming
+### Global Theming {/* #global-theming */}
Ionic's powerful theming system can be used to easily change your entire app to match a certain theme. In this example, we used the [Color Creator](../theming/colors#new-color-creator) and the [Stepped Color Generator](../theming/themes#stepped-color-generator) to create a rose color palette that we can use for `ion-datetime`.
@@ -371,7 +371,7 @@ The benefit of this approach is that every component, not just `ion-datetime`, c
-### Datetime Header
+### Datetime Header {/* #datetime-header */}
The datetime header manages the content for the `title` slot and the selected date.
@@ -383,7 +383,7 @@ The selected date will not render if `preferWheel` is set to `true`.
-### Calendar Header
+### Calendar Header {/* #calendar-header */}
The calendar header manages the date navigation controls (month/year picker and prev/next buttons) and the days of the week when using a grid style layout.
@@ -391,7 +391,7 @@ The header can be styled using CSS shadow parts.
-### Calendar Days
+### Calendar Days {/* #calendar-days */}
The calendar days in a grid-style `ion-datetime` can be styled using CSS shadow parts.
@@ -403,13 +403,13 @@ The example below selects the day 2 days ago, unless that day is in the previous
-### Wheel Pickers
+### Wheel Pickers {/* #wheel-pickers */}
The wheels used in `ion-datetime` can be styled through a combination of shadow parts and CSS variables. This applies to both the columns in wheel-style datetimes, and the month/year picker in grid-style datetimes.
-## Time Zones
+## Time Zones {/* #time-zones */}
Ionic's `ion-datetime` follows the [datetime-local](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime-local) behavior of not manipulating or setting the time zone inside of a datetime control. In other words, a time value of "07:00" will not be adjusted according to different time zones.
@@ -433,7 +433,7 @@ const zonedTime = utcToZonedTime(date, userTimeZone);
format(zonedTime, 'yyyy-MM-dd HH:mm:ssXXX', { timeZone: userTimeZone });
```
-### Parsing Date Values
+### Parsing Date Values {/* #parsing-date-values */}
The `ionChange` event will emit the date value as an ISO-8601 string in the event payload. It is the developer's responsibility to format it based on their application needs. We recommend using [date-fns](https://date-fns.org) to format the date value.
@@ -456,7 +456,7 @@ console.log(formattedString); // Jun 4, 2021
See https://date-fns.org/docs/format for a list of all the valid format tokens.
-## Advanced Datetime Validation and Manipulation
+## Advanced Datetime Validation and Manipulation {/* #advanced-datetime-validation-and-manipulation */}
The datetime picker provides the simplicity of selecting an exact format, and
persists the datetime values as a string using the standardized [ISO 8601
@@ -468,9 +468,9 @@ subtracting 30 minutes, etc.), or even formatting data to a specific locale,
then we highly recommend using [date-fns](https://date-fns.org) to work with
dates in JavaScript.
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Keyboard Interactions
+### Keyboard Interactions {/* #keyboard-interactions */}
`ion-datetime` has full keyboard support for navigating between focusable elements inside of the component. The following table details what each key does:
@@ -480,7 +480,7 @@ dates in JavaScript.
| Shift + Tab | Moves focus to the previous focusable element. |
| Space or Enter | Clicks the focusable element. |
-#### Date Grid
+#### Date Grid {/* #date-grid */}
| Key | Description |
| -------------------------------------- | ------------------------------------------------- |
@@ -495,13 +495,13 @@ dates in JavaScript.
| Shift + PageUp | Changes the grid of dates to the previous year. |
| Shift + PageDown | Changes the grid of dates to the next year. |
-#### Time, Month, and Year Wheels
+#### Time, Month, and Year Wheels {/* #time-month-and-year-wheels */}
The wheel picker in Datetime uses [Picker](./picker) internally. Refer to [Picker Accessibility](./picker#accessibility) for more information on accessibility features with the wheel picker.
-## Interfaces
+## Interfaces {/* #interfaces */}
-### DatetimeChangeEventDetail
+### DatetimeChangeEventDetail {/* #datetimechangeeventdetail */}
```typescript
interface DatetimeChangeEventDetail {
@@ -509,7 +509,7 @@ interface DatetimeChangeEventDetail {
}
```
-### DatetimeCustomEvent
+### DatetimeCustomEvent {/* #datetimecustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
@@ -520,26 +520,26 @@ interface DatetimeCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/fab-button.mdx b/docs/api/fab-button.mdx
index 01e480dec4a..ff833d1400e 100644
--- a/docs/api/fab-button.mdx
+++ b/docs/api/fab-button.mdx
@@ -27,26 +27,26 @@ As the name suggests, FABs generally float over the content in a fixed position.
For usage examples, refer to the [fab documentation](./fab).
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/fab-list.mdx b/docs/api/fab-list.mdx
index a7e1b3da627..5cd23d6fb8a 100644
--- a/docs/api/fab-list.mdx
+++ b/docs/api/fab-list.mdx
@@ -17,26 +17,26 @@ The fab list component is a container for multiple [fab buttons](./fab-button).
For usage examples, refer to the [fab documentation](./fab).
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/fab.mdx b/docs/api/fab.mdx
index ab5f6b16ee0..a000b4aa79e 100644
--- a/docs/api/fab.mdx
+++ b/docs/api/fab.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Fabs are container elements that contain one or more [fab buttons](./fab-button). They should be placed in a fixed position that does not scroll with the content. Fabs should have one main fab button. Fabs can also contain one or more [fab lists](./fab-list) which contain related buttons that show when the main fab button is clicked.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import BasicUsage from '@site/static/usage/v10/fab/basic/index.mdx';
-## List Side
+## List Side {/* #list-side */}
The `side` property of the [fab list](./fab-list) component controls where it appears relative to the main fab button. A single fab can have multiple fab lists as long as they all have different values for `side`.
@@ -37,7 +37,7 @@ import ListSide from '@site/static/usage/v10/fab/list-side/index.mdx';
-## Positioning
+## Positioning {/* #positioning */}
In order to place the fab in a fixed position, it should be assigned to the `fixed` slot of the outer [content](./content) component. Use the `vertical` and `horizontal` props to control the alignment of the fab in the viewport. The `edge` prop will cause the fab button to overlap with the app's header or footer.
@@ -45,7 +45,7 @@ import Positioning from '@site/static/usage/v10/fab/positioning/index.mdx';
-### Safe Area
+### Safe Area {/* #safe-area */}
If there is no `ion-header` or `ion-footer` component, the fab may be covered by a device's notch, status bar, or other device UI. In these cases, the [safe area](/theming/advanced.mdx#safe-area-padding) on the top and bottom is not taken into account. This can be adjusted by using the [`--ion-safe-area-(dir)` variables](/theming/advanced.mdx#application-variables).
@@ -71,7 +71,7 @@ import SafeArea from '@site/static/usage/v10/fab/safe-area/index.mdx';
-### Relative to Infinite List
+### Relative to Infinite List {/* #relative-to-infinite-list */}
In scenarios where a view contains many interactive elements, such as an infinitely-scrolling list, it may be challenging for users to navigate to the Floating Action Button (FAB) if it is placed below all the items in the DOM.
@@ -81,7 +81,7 @@ import BeforeContent from '@site/static/usage/v10/fab/before-content/index.mdx';
-## Button Sizing
+## Button Sizing {/* #button-sizing */}
Setting the `size` property of the main fab button to `"small"` will render it at a mini size. Note that this property will not have an effect when used with the inner fab buttons.
@@ -89,52 +89,52 @@ import ButtonSizing from '@site/static/usage/v10/fab/button-sizing/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/fab/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSCustomProperties from '@site/static/usage/v10/fab/theming/css-custom-properties/index.mdx';
-### CSS Shadow Parts
+### CSS Shadow Parts {/* #css-shadow-parts */}
import CSSShadowParts from '@site/static/usage/v10/fab/theming/css-shadow-parts/index.mdx';
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Labels
+### Labels {/* #labels */}
Since FABs are allowed to contain only icons, developers must provide an `aria-label` on each `ion-fab-button` instance. Without this label, assistive technologies will not be able to announce the purpose of each button.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts-1 */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/footer.mdx b/docs/api/footer.mdx
index d23965daac6..5d323525e63 100644
--- a/docs/api/footer.mdx
+++ b/docs/api/footer.mdx
@@ -21,13 +21,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Footer is a root component of a page that aligns itself to the bottom of the page. It is recommended to be used as a wrapper for one or more [toolbars](./toolbar), but it can be used to wrap any element. When a toolbar is used inside of a footer, the content will be adjusted so it is sized correctly, and the footer will account for any device safe areas.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/footer/basic/index.mdx';
-## Translucent Footer
+## Translucent Footer {/* #translucent-footer */}
Footers can match the transparency found in native iOS applications by setting the `translucent` property. In order for the content to scroll behind the footer, the `fullscreen` property needs to be set on the content. This effect will only apply when the mode is `"ios"` and the device supports [backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#browser_compatibility).
@@ -35,7 +35,7 @@ import Translucent from '@site/static/usage/v10/footer/translucent/index.mdx';
-## Fade Footer
+## Fade Footer {/* #fade-footer */}
Many native iOS applications have a fade effect on the toolbar. This can be achieved by setting the `collapse` property on the footer to `"fade"`. When the content is scrolled to the end, the background and border on the footer will fade away. This effect will only apply when the mode is `"ios"`.
@@ -43,7 +43,7 @@ import Fade from '@site/static/usage/v10/footer/fade/index.mdx';
-### Usage with Virtual Scroll
+### Usage with Virtual Scroll {/* #usage-with-virtual-scroll */}
A fade footer requires a scroll container to work properly. When using a virtual scrolling solution, a custom scroll target needs to be provided. Scrolling on the content needs to be disabled and the `.ion-content-scroll-host` class needs to be added to the element responsible for scrolling.
@@ -51,7 +51,7 @@ import CustomScrollTarget from '@site/static/usage/v10/footer/custom-scroll-targ
-## Borders
+## Borders {/* #borders */}
In `"md"` mode, the footer will have a `box-shadow` on the top. In `"ios"` mode, it will receive a `border` on the top. These can be removed by adding the `.ion-no-border` class to the footer.
@@ -59,26 +59,26 @@ import NoBorder from '@site/static/usage/v10/footer/no-border/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/gallery-item.mdx b/docs/api/gallery-item.mdx
index d2c17de6da7..d303d769a12 100644
--- a/docs/api/gallery-item.mdx
+++ b/docs/api/gallery-item.mdx
@@ -27,26 +27,26 @@ Gallery Items must be placed inside a Gallery, which arranges them and applies l
Refer to the [Gallery](./gallery.mdx) documentation for more information.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/gallery.mdx b/docs/api/gallery.mdx
index 3b4d420cb9c..0a49eb0dca0 100644
--- a/docs/api/gallery.mdx
+++ b/docs/api/gallery.mdx
@@ -25,13 +25,13 @@ The Gallery arranges images, cards, and other content in a responsive grid. It s
Each [Gallery Item](./gallery-item.mdx) is a single cell of the grid and can contain plain text or any element, such as an `img`, a `figure` with a caption, or a [Card](./card.mdx).
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/gallery/basic/index.mdx';
-## Uniform
+## Uniform {/* #uniform */}
Uniform is the default layout. It creates a consistent grid where items appear at the same visual size with a `1 / 1` aspect ratio. This layout is ideal when visual alignment is more important than preserving each item's natural height.
@@ -39,11 +39,11 @@ import Uniform from '@site/static/usage/v10/gallery/uniform/index.mdx';
-## Masonry
+## Masonry {/* #masonry */}
Masonry preserves each item's natural height and stacks items vertically within each column, creating a staggered layout with minimal gaps. Masonry supports two ordering modes: sequential and best fit.
-### Sequential
+### Sequential {/* #sequential */}
Sequential is the default masonry ordering mode. Items are placed in DOM order, filling columns from left to right.
@@ -51,7 +51,7 @@ import MasonrySequential from '@site/static/usage/v10/gallery/masonry-sequential
-### Best Fit
+### Best Fit {/* #best-fit */}
Best fit places each item in the column with the most available space, helping balance column heights.
@@ -59,7 +59,7 @@ import MasonryBestFit from '@site/static/usage/v10/gallery/masonry-best-fit/inde
-### Images
+### Images {/* #images */}
An `img` placed directly inside a Gallery Item is given default styles to ensure consistent rendering. These styles make images fill their cell while preserving their aspect ratio and keeping them centered.
@@ -83,7 +83,7 @@ import Images from '@site/static/usage/v10/gallery/images/index.mdx';
-## Columns
+## Columns {/* #columns */}
Columns can be configured with the `columns` property using either a single number for a fixed column count, or a breakpoint map to change columns across screen sizes.
@@ -102,7 +102,7 @@ import Columns from '@site/static/usage/v10/gallery/columns/index.mdx';
-## Gap
+## Gap {/* #gap */}
Gap can be configured with the `gap` property using either a single value for a fixed gap, or a breakpoint map to change gap across screen sizes.
@@ -121,9 +121,9 @@ import Gap from '@site/static/usage/v10/gallery/gap/index.mdx';
-## Interfaces
+## Interfaces {/* #interfaces */}
-### GalleryBreakpoints
+### GalleryBreakpoints {/* #gallerybreakpoints */}
```typescript
interface GalleryBreakpoints {
@@ -136,40 +136,40 @@ interface GalleryBreakpoints {
}
```
-## Types
+## Types {/* #types */}
-### GalleryColumns
+### GalleryColumns {/* #gallerycolumns */}
```typescript
type GalleryColumns = GalleryBreakpoints | string | number;
```
-### GalleryGap
+### GalleryGap {/* #gallerygap */}
```typescript
type GalleryGap = GalleryBreakpoints | string | number;
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/grid.mdx b/docs/api/grid.mdx
index 619d6e4a3ac..270169ca33d 100644
--- a/docs/api/grid.mdx
+++ b/docs/api/grid.mdx
@@ -23,7 +23,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The grid is a powerful mobile-first flexbox system for building custom layouts. It is composed of three units — a grid, [row(s)](row.mdx) and [column(s)](col.mdx). Columns will expand to fill the row, and will resize to fit additional columns. It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized using CSS.
-## Overview
+## Overview {/* #overview */}
- Grids act as a container for all rows and columns. Grids take up the full width of their container,
but adding the `fixed` property will set the width based on the screen size, refer to [Fixed Grid](#fixed-grid) below.
@@ -40,7 +40,7 @@ The grid is a powerful mobile-first flexbox system for building custom layouts.
(e.g., `size-sm="4"` applies to small, medium, large, and extra large devices).
- Grids can be customized via CSS variables. Refer to [Customizing the Grid](#customizing-the-grid).
-## Default Breakpoints
+## Default Breakpoints {/* #default-breakpoints */}
The default breakpoints for the grid and the corresponding properties are defined in the table below. Breakpoint values can not be customized at this time. For more information on why they can't be customized, refer to [Variables in Media Queries](../theming/advanced#variables-in-media-queries).
@@ -52,7 +52,7 @@ The default breakpoints for the grid and the corresponding properties are define
| lg | 992px | `sizeLg` | `offsetLg` | `pushLg` | `pullLg` | Set columns when (min-width: 992px) |
| xl | 1200px | `sizeXl` | `offsetXl` | `pushXl` | `pullXl` | Set columns when (min-width: 1200px) |
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
By default, columns will take up equal width inside of a row for all devices and screen sizes.
@@ -60,7 +60,7 @@ import Basic from '@site/static/usage/v10/grid/basic/index.mdx';
-## Fixed Grid
+## Fixed Grid {/* #fixed-grid */}
Grids take up 100% width of their container. By adding the `fixed` property to the grid, the width will be set based on the screen size. The width of the grid for each breakpoint is listed in the table below, but it can be customized. For more information, refer to [Customizing the Grid](#customizing-the-grid). Open the below example in StackBlitz and resize the screen to observe how the grid width changes.
@@ -76,11 +76,11 @@ import Fixed from '@site/static/usage/v10/grid/fixed/index.mdx';
-## Column Size
+## Column Size {/* #column-size */}
Columns can be set to specific sizes to take up a certain number out of the total number of columns, or resize their width based on the content. The default number of columns is 12, but this can be customized. Refer to the [Number of Columns](#number-of-columns) section below for more information.
-### Content-based size
+### Content-based size {/* #content-based-size */}
By setting the `size` to `"auto"` the column can size itself based on the natural width of its content. This is necessary when setting a column to an absolute width, such as a specific number of pixels. The columns next to the auto-width column will resize to fill the row.
@@ -88,7 +88,7 @@ import SizeAuto from '@site/static/usage/v10/grid/size-auto/index.mdx';
-### Specified size
+### Specified size {/* #specified-size */}
Set the `size` of a column and the others will automatically resize around it. If a size is specified on all of the columns and it doesn't add up to the total number of columns, there will be empty space after the columns.
@@ -96,7 +96,7 @@ import Size from '@site/static/usage/v10/grid/size/index.mdx';
-### Responsive size
+### Responsive size {/* #responsive-size */}
The `size` property will change the column width for all [breakpoints](#default-breakpoints). Column also provides several size properties with the breakpoint name appended to the end of "size". These properties can be used to change the width of the column based on the screen size. Open the below example in StackBlitz and resize the screen to observe how the column widths change.
@@ -104,11 +104,11 @@ import SizeResponsive from '@site/static/usage/v10/grid/size-responsive/index.md
-## Column Offset
+## Column Offset {/* #column-offset */}
Columns can be offset to shift to the right by a certain number of columns out of the total number of columns.
-### Specified offset
+### Specified offset {/* #specified-offset */}
Columns can be moved to the right by using the `offset` property. This property increases the left margin of the column by the number of specified columns. It also shifts the columns to the right of it, if any exist.
@@ -116,7 +116,7 @@ import Offset from '@site/static/usage/v10/grid/offset/index.mdx';
-### Responsive offset
+### Responsive offset {/* #responsive-offset */}
The `offset` property will change the column's left margin for all [breakpoints](#default-breakpoints). Column also provides several offset properties with the breakpoint name appended to the end of "offset". These properties can be used to change the offset of the column based on the screen size. Open the below example in StackBlitz and resize the screen to observe how the column offsets change.
@@ -124,11 +124,11 @@ import OffsetResponsive from '@site/static/usage/v10/grid/offset-responsive/inde
-## Column Push & Pull
+## Column Push & Pull {/* #column-push--pull */}
Columns can be pushed to to the right or pulled to the left by a certain number of columns out of the total number of columns.
-### Specified push & pull
+### Specified push & pull {/* #specified-push--pull */}
Reorder the columns by adding the `push` and `pull` properties. These properties adjust the `left` and `right` of the columns by the specified number of columns making it easy to reorder columns. This will cause columns to overlap if they are shifted to where another column is positioned.
@@ -136,7 +136,7 @@ import PushPull from '@site/static/usage/v10/grid/push-pull/index.mdx';
-### Responsive push & pull
+### Responsive push & pull {/* #responsive-push--pull */}
The `push` and `pull` properties will change the column's position for all [breakpoints](#default-breakpoints). Column also provides several `push` and `pull` properties with the breakpoint name appended to the end of "push" / "pull". These properties can be used to change the position of the column based on the screen size. Open the below example in StackBlitz and resize the screen to observe how the column positions change.
@@ -144,9 +144,9 @@ import PushPullResponsive from '@site/static/usage/v10/grid/push-pull-responsive
-## Alignment
+## Alignment {/* #alignment */}
-### Vertical Alignment
+### Vertical Alignment {/* #vertical-alignment */}
All columns can be vertically aligned inside of a row by adding different classes to the row. For a list of available classes, refer to [css utilities](/layout/css-utilities#flex-container-properties).
@@ -154,7 +154,7 @@ import VerticalAlignment from '@site/static/usage/v10/grid/vertical-alignment/in
-### Horizontal Alignment
+### Horizontal Alignment {/* #horizontal-alignment */}
All columns can be horizontally aligned inside of a row by adding different classes to the row. For a list of available classes, refer to [css utilities](/layout/css-utilities.mdx#flex-container-properties).
@@ -162,11 +162,11 @@ import HorizontalAlignment from '@site/static/usage/v10/grid/horizontal-alignmen
-## Customizing the Grid
+## Customizing the Grid {/* #customizing-the-grid */}
Using our built-in CSS variables, it’s possible to customize the predefined grid attributes. Change the values of the padding, the number of columns, and more.
-### Fixed Width
+### Fixed Width {/* #fixed-width */}
The width of a fixed grid can be set for all breakpoints with the `--ion-grid-width` CSS variable. To override individual breakpoints, use the `--ion-grid-width-{breakpoint}` CSS variables. The default value for each of the breakpoints can be found in the [Fixed Grid](#fixed-grid) section. Open the below example in StackBlitz and resize the screen to observe how the grid width changes.
@@ -174,7 +174,7 @@ import Width from '@site/static/usage/v10/grid/customizing/width/index.mdx';
-### Number of Columns
+### Number of Columns {/* #number-of-columns */}
The number of grid columns can be modified with the `--ion-grid-columns` CSS variable. By default there are 12 grid columns, but this can be changed to any positive integer and be used to calculate the width of each individual column.
@@ -182,7 +182,7 @@ import ColumnNumber from '@site/static/usage/v10/grid/customizing/column-number/
-### Padding
+### Padding {/* #padding */}
The padding on the grid container can be set for all breakpoints with the `--ion-grid-padding` CSS variable. To override individual breakpoints, use the `--ion-grid-padding-{breakpoint}` CSS variables.
@@ -192,26 +192,26 @@ import Padding from '@site/static/usage/v10/grid/customizing/padding/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/header.mdx b/docs/api/header.mdx
index 75cc0e00783..ee4f2af2d06 100644
--- a/docs/api/header.mdx
+++ b/docs/api/header.mdx
@@ -21,13 +21,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Header is a root component of a page that aligns itself to the top of the page. It is recommended to be used as a wrapper for one or more [toolbars](./toolbar), but it can be used to wrap any element. When a toolbar is used inside of a header, the content will be adjusted so it is sized correctly, and the header will account for any device safe areas.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/header/basic/index.mdx';
-## Translucent Header
+## Translucent Header {/* #translucent-header */}
Headers can match the transparency found in native iOS applications by setting the `translucent` property. In order for the content to scroll behind the header, the `fullscreen` property needs to be set on the content. This effect will only apply when the mode is `"ios"` and the device supports [backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#browser_compatibility).
@@ -35,7 +35,7 @@ import Translucent from '@site/static/usage/v10/header/translucent/index.mdx';
-## Condensed Header
+## Condensed Header {/* #condensed-header */}
Ionic provides the functionality found in native iOS applications to show a large toolbar title and then collapse it to a small title when scrolling. This can be done by adding two headers, one above the content and one inside of the content, and then setting the `collapse` property to `"condense"` on the header inside of the content. This effect will only apply when the mode is "ios".
@@ -43,7 +43,7 @@ import Condense from '@site/static/usage/v10/header/condense/index.mdx';
-## Fade Header
+## Fade Header {/* #fade-header */}
Many native iOS applications have a fade effect on the toolbar. This can be achieved by setting the `collapse` property on the header to `"fade"`. When the page is first loaded, the background and border on the header will be hidden. As the content is scrolled, the header will fade back in. This effect will only apply when the mode is "ios".
@@ -53,7 +53,7 @@ import Fade from '@site/static/usage/v10/header/fade/index.mdx';
-### Usage with Virtual Scroll
+### Usage with Virtual Scroll {/* #usage-with-virtual-scroll */}
A fade header requires a scroll container to work properly. When using a virtual scrolling solution, a custom scroll target needs to be provided. Scrolling on the content needs to be disabled and the `.ion-content-scroll-host` class needs to be added to the element responsible for scrolling.
@@ -61,7 +61,7 @@ import CustomScrollTarget from '@site/static/usage/v10/header/custom-scroll-targ
-## Borders
+## Borders {/* #borders */}
In `"md"` mode, the header will have a `box-shadow` on the bottom. In `"ios"` mode, it will receive a `border` on the bottom. These can be removed by adding the `.ion-no-border` class to the header.
@@ -69,26 +69,26 @@ import NoBorder from '@site/static/usage/v10/header/no-border/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/icon.mdx b/docs/api/icon.mdx
index 7c5d84f4365..1b2a58aaaed 100644
--- a/docs/api/icon.mdx
+++ b/docs/api/icon.mdx
@@ -14,13 +14,13 @@ Icon is a universal container for displaying icons. While [Ionicons](https://ion
For Ionicons documentation, refer to [ionic.io/ionicons](https://ionic.io/ionicons).
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/icon/basic/index.mdx';
-## Font Icons
+## Font Icons {/* #font-icons */}
Font-based icons from libraries such as Font Awesome, Bootstrap Icons, Remix Icons, and Phosphor Icons can be displayed by slotting them into Icon.
@@ -28,7 +28,7 @@ import FontIcons from '@site/static/usage/v10/icon/font-icons/index.mdx';
-## Custom SVGs
+## Custom SVGs {/* #custom-svgs */}
Custom SVGs can be displayed with Icon in two ways: by loading an external SVG file using the `src` property or by slotting SVG content directly into the component.
@@ -36,7 +36,7 @@ import CustomSVGs from '@site/static/usage/v10/icon/custom-svgs/index.mdx';
-## Accessibility
+## Accessibility {/* #accessibility */}
Icons that are purely decorative content should have aria-hidden="true". This will not visually hide the icon, but it will hide the element from assistive technology.
diff --git a/docs/api/img.mdx b/docs/api/img.mdx
index cfc9ed1a1a2..d6581d75d3b 100644
--- a/docs/api/img.mdx
+++ b/docs/api/img.mdx
@@ -29,32 +29,32 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Img is a tag that will lazily load an image whenever the tag is in the viewport. This is extremely useful when generating a large list as images are only loaded when they're visible. The component uses [Intersection Observer](https://caniuse.com/#feat=intersectionobserver) internally, which is supported in most modern browsers, but falls back to a `setTimeout` when it is not supported.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/img/basic/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/infinite-scroll-content.mdx b/docs/api/infinite-scroll-content.mdx
index cd386f45650..8b420daf9ce 100644
--- a/docs/api/infinite-scroll-content.mdx
+++ b/docs/api/infinite-scroll-content.mdx
@@ -15,26 +15,26 @@ The `ion-infinite-scroll-content` component is the default child used by the `io
For more information as well as usage, refer to the [Infinite Scroll Documentation](./infinite-scroll.mdx#custom-content).
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/infinite-scroll.mdx b/docs/api/infinite-scroll.mdx
index b1704d8ffdf..29bc54f2e23 100644
--- a/docs/api/infinite-scroll.mdx
+++ b/docs/api/infinite-scroll.mdx
@@ -23,13 +23,13 @@ The Infinite Scroll component calls an action to be performed when the user scro
The expression assigned to the `ionInfinite` event is called when the user reaches that defined distance. When this expression has finished any and all tasks, it should call the `complete()` method on the infinite scroll instance.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/infinite-scroll/basic/index.mdx';
-## Loading Text and Spinner
+## Loading Text and Spinner {/* #loading-text-and-spinner */}
The `ion-infinite-scroll-content` is responsible for the visual display of the infinite scroll interaction. By default this component changes its look depending on the infinite scroll's state. It displays a spinner that looks best based on the platform the user is on. Both the spinner and loading text can be customized by setting properties on the `ion-infinite-scroll-content` component.
@@ -37,7 +37,7 @@ import InfiniteScrollContent from '@site/static/usage/v10/infinite-scroll/infini
-## Custom Content
+## Custom Content {/* #custom-content */}
Separating the `ion-infinite-scroll` and `ion-infinite-scroll-content` components allows developers to create their own content components, if desired. This content can contain anything, from an SVG element to elements with unique CSS animations.
@@ -45,7 +45,7 @@ import CustomContent from '@site/static/usage/v10/infinite-scroll/custom-infinit
-## Usage with Virtual Scroll
+## Usage with Virtual Scroll {/* #usage-with-virtual-scroll */}
Infinite scroll requires a scroll container. When using a virtual scrolling solution, you will need to disable scrolling on the `ion-content` and indicate which element container is responsible for the scroll container with the `.ion-content-scroll-host` class target.
@@ -66,7 +66,7 @@ Infinite scroll requires a scroll container. When using a virtual scrolling solu
:::
-## Accessibility
+## Accessibility {/* #accessibility */}
Developers should assign the `role="feed"` attribute to the scrollable list of items that are added to or removed from as the user scrolls.
@@ -90,9 +90,9 @@ For example, when rendering a collection of items in an `ion-list`:
Please refer to the [ARIA: feed role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/feed_role) documentation for additional information.
-## Interfaces
+## Interfaces {/* #interfaces */}
-### InfiniteScrollCustomEvent
+### InfiniteScrollCustomEvent {/* #infinitescrollcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
@@ -102,26 +102,26 @@ interface InfiniteScrollCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/input-otp.mdx b/docs/api/input-otp.mdx
index 940ab110bec..c429bbdecf9 100644
--- a/docs/api/input-otp.mdx
+++ b/docs/api/input-otp.mdx
@@ -23,7 +23,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The Input OTP component is a specialized input component designed for entering one-time passwords (OTP). It provides a user-friendly interface for entering verification codes with support for multiple input boxes and automatic focus management.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
The component provides 4 input boxes by default, which is a common length for many verification codes. The number of input boxes can be customized using the `length` property.
@@ -31,7 +31,7 @@ import Basic from '@site/static/usage/v10/input-otp/basic/index.mdx';
-## Type
+## Type {/* #type */}
The `type` property determines the input format, supporting either numeric or alphanumeric verification codes. It accepts two values: `number` and `text`. It uses `type="number"` by default for entering numeric verification codes. When `type="text"` is specified, it accepts alphanumeric input. This flexibility allows handling different OTP formats, whether numeric-only codes (like SMS verification codes) or alphanumeric codes (like backup codes or recovery keys).
@@ -50,7 +50,7 @@ import Type from '@site/static/usage/v10/input-otp/type/index.mdx';
-## Shape
+## Shape {/* #shape */}
The `shape` property controls the border radius of the input boxes, creating rounded or sharp corners.
@@ -58,7 +58,7 @@ import Shape from '@site/static/usage/v10/input-otp/shape/index.mdx';
-## Fill
+## Fill {/* #fill */}
The `fill` property controls the background style of the input boxes, offering bordered or filled backgrounds.
@@ -66,7 +66,7 @@ import Fill from '@site/static/usage/v10/input-otp/fill/index.mdx';
-## Size
+## Size {/* #size */}
The `size` property provides different size options for the input boxes.
@@ -74,7 +74,7 @@ import Size from '@site/static/usage/v10/input-otp/size/index.mdx';
-## Separators
+## Separators {/* #separators */}
The `separators` property adds visual dividers between one or more of the input boxes. Separators can be defined in three ways:
@@ -88,7 +88,7 @@ import Separators from '@site/static/usage/v10/input-otp/separators/index.mdx';
-## States
+## States {/* #states */}
The component supports various states for automatic styling of input boxes:
@@ -103,7 +103,7 @@ import States from '@site/static/usage/v10/input-otp/states/index.mdx';
-## Pattern
+## Pattern {/* #pattern */}
The `pattern` property enables custom validation using regular expressions. It accepts a [string regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions/Cheatsheet) or [unicode regular expression](https://www.regular-expressions.info/unicode.html) to validate allowed characters. The `pattern` must match the entire value, not just a subset. Default patterns:
@@ -125,9 +125,9 @@ import Pattern from '@site/static/usage/v10/input-otp/pattern/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
The `color` property changes the color palette for input boxes. For `outline` fills, this property changes the caret color, highlight color and border color. For `solid` fills, this property changes the caret color and highlight color.
@@ -141,7 +141,7 @@ import Colors from '@site/static/usage/v10/input-otp/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
Input OTP uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input-otp` for customization will not work; therefore we recommend adding a class and customizing it that way. Due to certain styles being applied based on the `fill`, you may need to override properties on the fills separately.
@@ -149,9 +149,9 @@ import CSSProps from '@site/static/usage/v10/input-otp/theming/css-properties/in
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Keyboard Interactions
+### Keyboard Interactions {/* #keyboard-interactions */}
The keyboard navigation for Input OTP follows the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/)'s recommendations for composite widgets. It is treated as a composite widget because it contains multiple focusable elements (input boxes) that function as a single control.
@@ -167,26 +167,26 @@ These keyboard interactions apply to all `ion-input-otp` elements when the compo
| Backspace | In an empty box: moves focus back one box and clears its value. In a box with a value: clears that value. With values in boxes to the right: shifts them all one position to the left. In RTL mode, with values in boxes to the left: shifts them all one position to the right. |
| Ctrl + V Cmd + V | Pastes content starting from the first box, regardless of which box is currently focused. All existing values are cleared before pasting. For example, if you have "1234" in all boxes and paste "56", the result will be "56" in the first two boxes with the remaining boxes empty. If the pasted content is longer than the available boxes, the extra characters are ignored. |
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/input-password-toggle.mdx b/docs/api/input-password-toggle.mdx
index 7d22799d1cf..b3d8feede25 100644
--- a/docs/api/input-password-toggle.mdx
+++ b/docs/api/input-password-toggle.mdx
@@ -23,7 +23,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The InputPasswordToggle component is a companion component to [Input](./input). It allows users to toggle the visibility of text in a password input.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
:::info
@@ -37,26 +37,26 @@ import Basic from '@site/static/usage/v10/input-password-toggle/basic/index.mdx'
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/input.mdx b/docs/api/input.mdx
index 5f193accd10..e700d3c7b4c 100644
--- a/docs/api/input.mdx
+++ b/docs/api/input.mdx
@@ -23,13 +23,13 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
The input component is a wrapper to the HTML input element with custom styling and additional functionality. It accepts most of the same properties as the HTML input and integrates with the keyboard on mobile devices.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/input/basic/index.mdx';
-## Types
+## Types {/* #types */}
The input component is meant for text type inputs only, such as `"text"`, `"password"`, `"email"`, `"number"`, `"search"`, `"tel"`, and `"url"`. It supports all standard text input events including `keyup`, `keydown`, `keypress`, and more. The default `type` is `"text"`.
@@ -37,7 +37,7 @@ import Types from '@site/static/usage/v10/input/types/index.mdx';
-## Labels
+## Labels {/* #labels */}
Labels should be used to describe the input. They can be used visually, and they will also be read out by screen readers when the user is focused on the input. This makes it easy for the user to understand the intent of the input. Input has several ways to assign a label:
@@ -45,7 +45,7 @@ Labels should be used to describe the input. They can be used visually, and they
- `label` slot: used for custom HTML labels (experimental)
- `aria-label`: used to provide a label for screen readers but adds no visible label
-### Label Placement
+### Label Placement {/* #label-placement */}
Labels will take up the width of their content by default. Developers can use the `labelPlacement` property to control how the label is placed relative to the control.
@@ -53,7 +53,7 @@ import LabelPlacement from '@site/static/usage/v10/input/label-placement/index.m
-### Label Slot (experimental)
+### Label Slot (experimental) {/* #label-slot-experimental */}
While plaintext labels should be passed in via the `label` property, if custom HTML is needed, it can be passed through the `label` slot instead.
@@ -63,7 +63,7 @@ import LabelSlot from '@site/static/usage/v10/input/label-slot/index.mdx';
-### No Visible Label
+### No Visible Label {/* #no-visible-label */}
If no visible label is needed, developers should still supply an `aria-label` so the input is accessible to screen readers.
@@ -71,7 +71,7 @@ import NoVisibleLabel from '@site/static/usage/v10/input/no-visible-label/index.
-## Clear Options
+## Clear Options {/* #clear-options */}
Inputs offer two options for clearing the input based on how you interact with it. The first way is by adding the `clearInput` property which will show a clear button when the input has a `value`. The second way is the `clearOnEdit` property which will clear the input after it has been blurred and then typed in again. Inputs with a `type` set to `"password"` will have `clearOnEdit` enabled by default.
@@ -79,7 +79,7 @@ import Clear from '@site/static/usage/v10/input/clear/index.mdx';
-## Filled Inputs
+## Filled Inputs {/* #filled-inputs */}
Material Design offers filled styles for an input. The `fill` property on the input can be set to either `"solid"` or `"outline"`.
@@ -95,7 +95,7 @@ import Fill from '@site/static/usage/v10/input/fill/index.mdx';
-## Helper & Error Text
+## Helper & Error Text {/* #helper--error-text */}
Helper and error text can be used inside of an input with the `helperText` and `errorText` property. The error text will not be displayed unless the `ion-invalid` and `ion-touched` classes are added to the `ion-input`. This ensures errors are not shown before the user has a chance to enter data.
@@ -105,7 +105,7 @@ import HelperError from '@site/static/usage/v10/input/helper-error/index.mdx';
-## Input Counter
+## Input Counter {/* #input-counter */}
The input counter is text that displays under an input to notify the user of how many characters have been entered out of the total that the input will accept. When adding counter, the default behavior is to format the value that gets displayed as `inputLength` / `maxLength`. This behavior can be customized by passing in a formatter function to the `counterFormatter` property.
@@ -121,7 +121,7 @@ import CounterAlignment from '@site/static/usage/v10/input/counter-alignment/ind
-## Filtering User Input
+## Filtering User Input {/* #filtering-user-input */}
Developers can use the `ionInput` event to update the input value in response to user input such as a `keypress`. This is useful for filtering out invalid or unwanted characters.
@@ -131,7 +131,7 @@ import FilteringData from '@site/static/usage/v10/input/filtering/index.mdx';
-## Input Masking
+## Input Masking {/* #input-masking */}
Input masks are expressions that constrain input to support valid input values. Ionic recommends using [Maskito](https://maskito.dev) for input masking. Maskito is a lightweight, dependency-free library for masking input fields. It supports a wide range of masks, including phone numbers, credit cards, dates, and more.
@@ -151,7 +151,7 @@ Please submit bug reports with Maskito to the [Maskito Github repository](https:
:::
-## Start and End Slots (experimental)
+## Start and End Slots (experimental) {/* #start-and-end-slots-experimental */}
The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the input.
@@ -169,9 +169,9 @@ import StartEndSlots from '@site/static/usage/v10/input/start-end-slots/index.md
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
Setting the `color` property changes the color palette for each input. On `ios` mode, this property changes the caret color. On `md` mode, this property changes the caret color and the highlight/underline color.
@@ -185,7 +185,7 @@ import Colors from '@site/static/usage/v10/input/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
Input uses scoped encapsulation, which means it will automatically scope its CSS by appending each of the styles with an additional class at runtime. Overriding scoped selectors in CSS requires a [higher specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity) selector. Targeting the `ion-input` for customization will not work; therefore we recommend adding a class and customizing it that way.
@@ -193,9 +193,9 @@ import CSSProps from '@site/static/usage/v10/input/theming/css-properties/index.
-## Interfaces
+## Interfaces {/* #interfaces */}
-### InputChangeEventDetail
+### InputChangeEventDetail {/* #inputchangeeventdetail */}
```typescript
interface InputChangeEventDetail {
@@ -203,7 +203,7 @@ interface InputChangeEventDetail {
}
```
-### InputCustomEvent
+### InputCustomEvent {/* #inputcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
@@ -214,26 +214,26 @@ interface InputCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/item-divider.mdx b/docs/api/item-divider.mdx
index 24399c2fda2..f301488a4e3 100644
--- a/docs/api/item-divider.mdx
+++ b/docs/api/item-divider.mdx
@@ -23,46 +23,46 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Item dividers are block elements that can be used to separate [items](./item) in a list. They are similar to list headers, but instead of only being placed at the top of a list, they should go in between groups of items.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/item-divider/basic/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/item-divider/theming/colors/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/item-divider/theming/css-properties/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties-1 */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/item-group.mdx b/docs/api/item-group.mdx
index 66e38fe76df..4907f8baa26 100644
--- a/docs/api/item-group.mdx
+++ b/docs/api/item-group.mdx
@@ -21,38 +21,38 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Item groups are containers that organize similar [items](./item) together. They can contain [item dividers](./item-divider) to divide the items into multiple sections. They can also be used to group [sliding items](./item-sliding).
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
import Basic from '@site/static/usage/v10/item-group/basic/index.mdx';
-## Sliding Items
+## Sliding Items {/* #sliding-items */}
import SlidingItems from '@site/static/usage/v10/item-group/sliding-items/index.mdx';
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/item-option.mdx b/docs/api/item-option.mdx
index c20db63ac9c..cfac54f0058 100644
--- a/docs/api/item-option.mdx
+++ b/docs/api/item-option.mdx
@@ -25,26 +25,26 @@ The item option component is an button for a sliding item. It must be placed ins
Refer to the [item sliding](./item-sliding) documentation for more information.
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/item-options.mdx b/docs/api/item-options.mdx
index b5202cea7ff..4a239342524 100644
--- a/docs/api/item-options.mdx
+++ b/docs/api/item-options.mdx
@@ -23,33 +23,33 @@ The item options component is a container for the [item option](./item-option) b
Refer to the [item sliding](./item-sliding) documentation for more information.
-## Side Description
+## Side Description {/* #side-description */}
| Side | Position | Swipe Direction |
| ------- | --------------------------------------------------------------- | ----------------------------------------------------------------- |
| `start` | To the `left` of the content in LTR, and to the `right` in RTL. | From `left` to `right` in LTR, and from `right` to `left` in RTL. |
| `end` | To the `right` of the content in LTR, and to the `left` in RTL. | From `right` to `left` in LTR, and from `left` to `right` in RTL. |
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/item-sliding.mdx b/docs/api/item-sliding.mdx
index fa860d19d6d..df2d55adfc9 100644
--- a/docs/api/item-sliding.mdx
+++ b/docs/api/item-sliding.mdx
@@ -21,7 +21,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
A sliding item contains an item that can be dragged to reveal option buttons. It requires an [item](./item) component as a child. All options to reveal should be placed in the [item options](./item-options) element.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
Sliding item options are placed on the `"end"` side of the item by default. This means that options are revealed when the item is swiped from end to start, i.e. from right to left in LTR, but from left to right in RTL. To place them on the opposite side, so that they are revealed when swiping in the opposite direction, set the side attribute to `"start"` on the [item options](./item-options) element. Up to two item options can be used at the same time in order to reveal two different sets of options depending on the swiping direction.
@@ -29,7 +29,7 @@ import Basic from '@site/static/usage/v10/item-sliding/basic/index.mdx';
-## Icon Options
+## Icon Options {/* #icon-options */}
When an icon is placed alongside text in the [item option](./item-option), it will display the icon on top of the text by default. The slot on the icon can be changed to any of the available [item option slots](./item-option#slots) to change its position.
@@ -37,7 +37,7 @@ import Icons from '@site/static/usage/v10/item-sliding/icons/index.mdx';
-## Expandable Options
+## Expandable Options {/* #expandable-options */}
Options can be expanded to take up the full width of the parent `ion-item` if you swipe past a certain point. This can be combined with the `ionSwipe` event on the [item options](./item-options) to call a method when the item is fully swiped.
@@ -45,9 +45,9 @@ import Expandable from '@site/static/usage/v10/item-sliding/expandable/index.mdx
-## Interfaces
+## Interfaces {/* #interfaces */}
-### ItemSlidingCustomEvent
+### ItemSlidingCustomEvent {/* #itemslidingcustomevent */}
While not required, this interface can be used in place of the `CustomEvent` interface for stronger typing with Ionic events emitted from this component.
@@ -57,26 +57,26 @@ interface ItemSlidingCustomEvent extends CustomEvent {
}
```
-## Properties
+## Properties {/* #properties */}
-## Events
+## Events {/* #events */}
-## Methods
+## Methods {/* #methods */}
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
-## CSS Custom Properties
+## CSS Custom Properties {/* #css-custom-properties */}
-## Slots
+## Slots {/* #slots */}
diff --git a/docs/api/item.mdx b/docs/api/item.mdx
index 04c96be93f5..09ca5308e86 100644
--- a/docs/api/item.mdx
+++ b/docs/api/item.mdx
@@ -28,7 +28,7 @@ import EncapsulationPill from '@components/page/api/EncapsulationPill';
Items are elements that can contain text, icons, avatars, images, inputs, and any other native or custom elements. Items should only be used as rows in a [List](./list) with other items. Items can be swiped, deleted, reordered, edited, and more.
-## Basic Usage
+## Basic Usage {/* #basic-usage */}
Items left align text and wrap when the text is wider than the item. We can modify this behavior using the CSS Utilities provided by Ionic Framework, such as using `.ion-text-nowrap` in the below example. Refer to the [CSS Utilities Documentation](/layout/css-utilities.mdx) for more classes that can be added to an item to transform the text.
@@ -36,11 +36,11 @@ import Basic from '@site/static/usage/v10/item/basic/index.mdx';
-## Content Types
+## Content Types {/* #content-types */}
While items in a list take many forms, they typically support 5 different content types: supporting visuals, text, metadata, actions, and controls. However, not all of these content types should be used together at the same time. The following guide shows the different content types as well as how to properly utilize them in an application.
-### Supporting Visuals
+### Supporting Visuals {/* #supporting-visuals */}
Supporting visuals are decorative icons or other adornments for an item. Common examples of supporting visuals are [Avatars](./avatar), [Icons](./icon), and [Thumbnails](./thumbnail). Since this content is not required to understand the intent of the item, it is typically hidden from screen readers using `aria-hidden="true"`.
@@ -70,7 +70,7 @@ import SupportingVisuals from '@site/static/usage/v10/item/content-types/support
-### Text
+### Text {/* #text */}
The text content type includes form control labels or other visible text. This text serves to indicate the intent of the item. Try to keep the text short and to the point.
@@ -108,7 +108,7 @@ import Text from '@site/static/usage/v10/item/content-types/text/index.mdx';
-### Metadata
+### Metadata {/* #metadata */}
Metadata provides additional context for an item such as status text or counts. Components like [Badge](./badge) or [Note](./note) are great ways of showing metadata.
@@ -156,7 +156,7 @@ import Metadata from '@site/static/usage/v10/item/content-types/metadata/index.m
-### Actions
+### Actions {/* #actions */}
Actions are interactive elements that do something when you activate them. An item can have multiple actions displayed on a line. However, developers should ensure that each action's tap target is large enough to be usable.
@@ -197,7 +197,7 @@ import Actions from '@site/static/usage/v10/item/content-types/actions/index.mdx
-### Controls
+### Controls {/* #controls */}
Controls are form components such as checkboxes, inputs, radios, and more. Each item in a list should have at most two controls due to screen space constraints.
@@ -278,7 +278,7 @@ import Controls from '@site/static/usage/v10/item/content-types/controls/index.m
-## Clickable Items
+## Clickable Items {/* #clickable-items */}
An item is considered "clickable" if it has an `href`, `button`, or `routerLink` property set. Clickable items have a few visual differences that indicate they can be interacted with. For example, a clickable item receives the ripple effect upon activation in `md` mode, has a highlight when activated in `ios` mode, and has a [detail arrow](#detail-arrows) by default in `ios` mode.
@@ -286,7 +286,7 @@ import Clickable from '@site/static/usage/v10/item/clickable/index.mdx';
-## Routing
+## Routing {/* #routing */}
Items support client-side navigation using the `routerLink` property. Setting `routerLink` renders the item as an anchor and navigates to the specified route when tapped. The `routerDirection` property controls the transition animation direction, and `routerAnimation` accepts a custom animation builder.
@@ -388,7 +388,7 @@ In Vue, use the `router-link` attribute on `ion-item`. The `router-direction` an
-## Detail Arrows
+## Detail Arrows {/* #detail-arrows */}
By default [clickable items](#clickable-items) will display a right arrow icon on `ios` mode. To hide the right arrow icon on clickable elements, set the `detail` property to `false`. To show the right arrow icon on an item that doesn't display it naturally, set the `detail` property to `true`.
@@ -396,7 +396,7 @@ import DetailArrows from '@site/static/usage/v10/item/detail-arrows/index.mdx';
-## Item Lines
+## Item Lines {/* #item-lines */}
Items show an inset bottom border by default. The border has padding on the left and does not appear under any content that is slotted in the `"start"` slot. The `lines` property can be modified to `"full"` or `"none"` which will show a full width border or no border, respectively.
@@ -404,7 +404,7 @@ import Lines from '@site/static/usage/v10/item/lines/index.mdx';
-## Buttons in Items
+## Buttons in Items {/* #buttons-in-items */}
Buttons are styled smaller inside of items than when they are outside of them. To make the button size match buttons outside of an item, set the `size` attribute to `"default"`.
@@ -412,33 +412,33 @@ import Buttons from '@site/static/usage/v10/item/buttons/index.mdx';
-## Item Inputs
+## Item Inputs {/* #item-inputs */}
import Inputs from '@site/static/usage/v10/item/inputs/index.mdx';
-## Theming
+## Theming {/* #theming */}
-### Colors
+### Colors {/* #colors */}
import Colors from '@site/static/usage/v10/item/theming/colors/index.mdx';
-### CSS Shadow Parts
+### CSS Shadow Parts {/* #css-shadow-parts */}
import CSSParts from '@site/static/usage/v10/item/theming/css-shadow-parts/index.mdx';
-### CSS Custom Properties
+### CSS Custom Properties {/* #css-custom-properties */}
import CSSProps from '@site/static/usage/v10/item/theming/css-properties/index.mdx';
-## Guidelines
+## Guidelines {/* #guidelines */}
The following guidelines will help ensure your list items are easy to understand and use.
@@ -447,9 +447,9 @@ The following guidelines will help ensure your list items are easy to understand
3. Items should never render [nested interactives](https://dequeuniversity.com/rules/axe/4.4/nested-interactive). Screen readers are unable to select the correct interactive element when nested interactives are used. For example, avoid placing a button inside of an `ion-item` that has `button="true"`.
4. Use [content types](#content-types) correctly. The Item component is designed to be a row in a [List](./list) and should not be used as a general purpose container.
-## Accessibility
+## Accessibility {/* #accessibility */}
-### Keyboard Interactions
+### Keyboard Interactions {/* #keyboard-interactions */}
An `` has the following keyboard interactions when any of these conditions are met:
@@ -462,7 +462,7 @@ An `` has the following keyboard interactions when any of these condit
| Tab | Moves focus to the next focusable element. |
| Shift + Tab | Moves focus to the previous focusable element. |
-#### Button
+#### Button {/* #button */}
When an `` renders a native `
-## Overview
+## Overview {/* #overview */}
Ionic focuses on the frontend UX and UI interaction of an app — UI controls, interactions, gestures, animations. It's easy to learn, and integrates with other libraries or frameworks, such as [Angular](angular/overview.mdx), [React](react/overview.mdx), or [Vue](vue/overview.mdx). Alternatively, it can be used standalone without any frontend framework using a simple [script include](intro/cdn.mdx). If you’d like to learn more about Ionic before diving in, we [created a video](https://youtu.be/p3AN3igqiRc) to walk you through the basics.
-### One codebase, running everywhere
+### One codebase, running everywhere {/* #one-codebase-running-everywhere */}
Ionic is the only mobile app stack that enables web developers to build apps for all major app stores and the mobile web from a single codebase. And with [Adaptive Styling](theming/platform-styles.mdx), Ionic apps look and feel at home on every device.
-### A focus on performance
+### A focus on performance {/* #a-focus-on-performance */}
Ionic is built to perform and behave great on the latest mobile devices with best practices like efficient hardware accelerated transitions, and touch-optimized gestures.
-### Clean, simple, and functional design
+### Clean, simple, and functional design {/* #clean-simple-and-functional-design */}
Ionic is designed to work and display beautifully on all current mobile devices and platforms. With ready-made components, typography, and a gorgeous (yet extensible) base theme that adapts to each platform, you'll be building in style.
-### Native and Web optimized
+### Native and Web optimized {/* #native-and-web-optimized */}
Ionic emulates native app UI guidelines and uses native SDKs, bringing the UI standards and device features of native apps together with the full power and flexibility of the open web. Ionic uses Capacitor (or Cordova) to deploy natively, or runs in the browser as a Progressive Web App.
-## Goals
+## Goals {/* #goals */}
-### Cross-platform
+### Cross-platform {/* #cross-platform */}
Build and deploy apps that work across multiple platforms, such as native iOS, Android, and the web as a Progressive Web App - all with one code base. Write once, run anywhere.
-### Web Standards-based
+### Web Standards-based {/* #web-standards-based */}
Ionic is built on top of reliable, [standardized web technologies](reference/glossary.mdx#web-standards): HTML, CSS, and JavaScript, using modern Web APIs such as Custom Elements and Shadow DOM. Because of this, Ionic components have a stable API, and aren't at the whim of a single platform vendor.
-### Beautiful Design
+### Beautiful Design {/* #beautiful-design */}
Clean, simple, and functional. Ionic is designed to work and display beautifully out-of-the-box across all platforms.
Start with pre-designed components, typography, interactive paradigms, and a gorgeous (yet extensible) base theme.
-### Simplicity
+### Simplicity {/* #simplicity */}
Ionic is built with simplicity in mind, so that creating apps is enjoyable, easy to learn, and accessible to just about anyone with web development skills.
-## Framework Compatibility
+## Framework Compatibility {/* #framework-compatibility */}
While past releases of Ionic were tightly coupled to Angular, version 4.x of the framework was re-engineered to work as a standalone [Web Component](https://developer.mozilla.org/en-US/docs/Web/Web_Components) library, with integrations for the latest JavaScript frameworks, like Angular. Ionic can be used in most frontend frameworks with success, including React and Vue, though some frameworks need a shim for full Web Component support.
-### JavaScript
+### JavaScript {/* #javascript */}
One of the main goals with moving Ionic to [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components) was to remove any hard requirement on a single framework to host the components. This made it possible for the core components to work standalone in a web page with just a script tag. While working with frameworks can be great for larger teams and larger apps, it is now possible to use Ionic as a standalone library in a single page even in a context like WordPress.
-### Angular
+### Angular {/* #angular */}
Angular has always been at the center of what makes Ionic great. While the core components have been written to work as a standalone Web Component library, the `@ionic/angular` package makes integration with the Angular ecosystem a breeze. `@ionic/angular` includes all the functionality that Angular developers would expect coming from Ionic 2/3, and integrates with core Angular libraries, like the Angular router.
-### React
+### React {/* #react */}
Ionic now has official support for the popular React library. Ionic React lets React developers use their existing web skills to build apps that target iOS, Android, and the web. With `@ionic/react`, you can use all the core Ionic components, but in a way that feels like using native React components.
-### Vue
+### Vue {/* #vue */}
Ionic now has official support for the popular Vue 3 library. Ionic Vue lets Vue developers use their existing web skills to build apps that target iOS, Android, and the web. With `@ionic/vue`, you can use all the core Ionic components, but in a way that feels like using native Vue components.
-### Future Support
+### Future Support {/* #future-support */}
Support for other frameworks will be considered in future releases.
-## Ionic CLI
+## Ionic CLI {/* #ionic-cli */}
The official [Ionic CLI](cli.mdx), or Command Line Interface, is a tool that quickly scaffolds Ionic apps and provides a number of helpful commands to Ionic developers. In addition to installing and updating Ionic, the CLI comes with a built-in development server, build and debugging tools, and much more. If you are an [Appflow](#appflow) member, the CLI can be used to perform cloud builds and deployments, and administer your account.
-## Appflow
+## Appflow {/* #appflow */}
To help build, deploy, and manage Ionic apps throughout their lifecycle, we offer a commercial service for production apps called [Appflow](https://ionic.io/appflow), which is **separate from the open source Framework.**
@@ -131,11 +131,11 @@ Appflow helps developers and teams compile native app builds and deploy live cod
Appflow requires an [Ionic Account](https://dashboard.ionicframework.com/signup) and comes with a free “Hobby” plan for those interested in playing around with some of its features.
-## Ecosystem
+## Ecosystem {/* #ecosystem */}
Ionic is actively developed and maintained full-time by a core team, and its ecosystem is guided by an international community of developers and contributors fueling its growth and adoption. Developers and companies small and large use Ionic to build and ship amazing apps that run everywhere.
-### Join the Community
+### Join the Community {/* #join-the-community */}
There are millions of Ionic developers in over 200 countries worldwide. Here are some ways to join:
@@ -144,7 +144,7 @@ There are millions of Ionic developers in over 200 countries worldwide. Here are
- [GitHub:](https://github.com/ionic-team/ionic) For reporting bugs or requesting new features, create an issue here. PRs welcome!
- [Content authoring:](https://ionicframework.com/contributors) Write a technical blog or share your story with the Ionic community.
-## License
+## License {/* #license */}
The Ionic UI Toolkit is a free and open source project, released under the permissible [MIT license](https://opensource.org/licenses/MIT). This means it can be used in personal or commercial projects for free. MIT is the same license used by such popular projects as jQuery and Ruby on Rails.
diff --git a/docs/intro/cdn.mdx b/docs/intro/cdn.mdx
index 55aad3c90c7..380f5bbbea7 100644
--- a/docs/intro/cdn.mdx
+++ b/docs/intro/cdn.mdx
@@ -16,7 +16,7 @@ import DocsCards from '@components/global/DocsCards';
Ionic Framework offers npm packages for Angular, React, Vue, and JavaScript, plus CDN links for quick prototyping. Choose your framework below to get started, or use the CDN to test Ionic Framework components in the browser.
-## Ionic Angular
+## Ionic Angular {/* #ionic-angular */}
Start a new Ionic Angular app or add Ionic to your existing Angular project.
@@ -40,7 +40,7 @@ Start a new Ionic Angular app or add Ionic to your existing Angular project.
-## Ionic React
+## Ionic React {/* #ionic-react */}
Start a new Ionic React app or add Ionic to your existing React project.
@@ -64,7 +64,7 @@ Start a new Ionic React app or add Ionic to your existing React project.
-## Ionic Vue
+## Ionic Vue {/* #ionic-vue */}
Start a new Ionic Vue app or add Ionic to your existing Vue project.
@@ -88,7 +88,7 @@ Start a new Ionic Vue app or add Ionic to your existing Vue project.
-## Ionic JavaScript
+## Ionic JavaScript {/* #ionic-javascript */}
Start a new Ionic JavaScript app.
@@ -104,7 +104,7 @@ Start a new Ionic JavaScript app.
-## Ionic Framework CDN
+## Ionic Framework CDN {/* #ionic-framework-cdn */}
Ionic Framework can be included from a CDN for quick testing in a [StackBlitz](https://stackblitz.com/), [Plunker](https://plnkr.co/), [Codepen](https://codepen.io), or any other online code editor!
@@ -118,7 +118,7 @@ It's recommended to use [jsdelivr](https://www.jsdelivr.com/) to access the Fram
With this it's possible to use all of the Ionic Framework core components without having to install a framework. The CSS bundle will include all of the Ionic [Global Stylesheets](/layout/global-stylesheets.mdx).
-## Ionicons CDN
+## Ionicons CDN {/* #ionicons-cdn */}
Ionicons is packaged by default with the Ionic Framework, so no installation is necessary if you're using Ionic. To use Ionicons without Ionic Framework, place the following `
```
-## Navigate to the New Page
+## Navigate to the New Page {/* #navigate-to-the-new-page */}
To navigate to the new page, update the button in `HomePage.js` to be inside of an `ion-router-link`:
@@ -336,7 +336,7 @@ Navigating can also be performed programmatically using `document.querySelector(
:::
-## Add Icons to the New Page
+## Add Icons to the New Page {/* #add-icons-to-the-new-page */}
Ionic JavaScript comes with [Ionicons](https://ionic.io/ionicons/) support. To use icons, you need to import them, register them with `addIcons`, and then use them with the `ion-icon` component.
@@ -383,7 +383,7 @@ customElements.define('new-page', NewPage);
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 {/* #call-component-methods */}
Let's add a button that can scroll the content area to the bottom. Update `NewPage.js` to include scrollable content and a scroll button:
@@ -452,7 +452,7 @@ To call methods on Ionic components:
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 {/* #run-on-a-device */}
Ionic's components work everywhere: on iOS, Android, and PWAs. To deploy to mobile, use [Capacitor](https://capacitorjs.com):
@@ -475,11 +475,11 @@ npx cap open android
Refer to [Capacitor's Getting Started guide](https://capacitorjs.com/docs/getting-started/with-ionic) for more.
-## Framework Integrations
+## Framework Integrations {/* #framework-integrations */}
Ionic Core also works with other frameworks and libraries that support custom elements, such as [Alpine.js](https://alpinejs.dev/), [Lit](https://lit.dev/), and [Svelte](https://svelte.dev/). However, when using Ionic Core with these libraries, you won't have the built-in form and routing capabilities that are tightly coupled with Ionic's official Angular, React, and Vue framework integrations, and will need to use their respective routing and form solutions instead.
-## Explore More
+## Explore More {/* #explore-more */}
This guide covered the basics of creating an Ionic JavaScript app with Vite, adding navigation, and introducing Capacitor for native builds. To dive deeper, check out:
diff --git a/docs/layout/css-utilities.mdx b/docs/layout/css-utilities.mdx
index a2621f8cfa9..a04a912d4ed 100644
--- a/docs/layout/css-utilities.mdx
+++ b/docs/layout/css-utilities.mdx
@@ -18,9 +18,9 @@ If your app was not started using an available Ionic Framework starter, the styl
:::
-## Text Modification
+## Text Modification {/* #text-modification */}
-### Text Align
+### Text Align {/* #text-align */}
```html
@@ -78,7 +78,7 @@ If your app was not started using an available Ionic Framework starter, the styl
| `.ion-text-wrap` | `white-space: normal` | Sequences of whitespace are collapsed. Newline characters in the source are handled as other whitespace. Breaks lines as necessary to fill line boxes. |
| `.ion-text-nowrap` | `white-space: nowrap` | Collapses whitespace as for `normal`, but suppresses line breaks (text wrapping) within text. |
-### Text Transform
+### Text Transform {/* #text-transform */}
```html
@@ -111,7 +111,7 @@ If your app was not started using an available Ionic Framework starter, the styl
| `.ion-text-lowercase` | `text-transform: lowercase` | Forces all characters to be converted to lowercase. |
| `.ion-text-capitalize` | `text-transform: capitalize` | Forces the first letter of each word to be converted to uppercase. |
-### Responsive Text Classes
+### Responsive Text Classes {/* #responsive-text-classes */}
All of the text classes listed above have additional classes to modify the text based on the screen size. Instead of `text-` in each class, use `text-{breakpoint}-` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -125,9 +125,9 @@ The table below shows the default behavior, where `{modifier}` is any of the fol
| `.ion-text-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-text-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-## Element Placement
+## Element Placement {/* #element-placement */}
-### Float
+### Float {/* #float */}
The [float](https://developer.mozilla.org/en-US/docs/Web/CSS/float) CSS property specifies that an element should be placed along the left or right side of its container, where text and inline elements will wrap around it. This way, the element is taken from the normal flow of the web page, though still remaining a part of the flow, contrary to absolute positioning.
@@ -174,7 +174,7 @@ The [float](https://developer.mozilla.org/en-US/docs/Web/CSS/float) CSS property
| `.ion-float-start` | `float: left` / `float: right` | The same as `float-left` if direction is left-to-right and `float-right` if direction is right-to-left. |
| `.ion-float-end` | `float: left` / `float: right` | The same as `float-right` if direction is left-to-right and `float-left` if direction is right-to-left. |
-### Responsive Float Classes
+### Responsive Float Classes {/* #responsive-float-classes */}
All of the float classes listed above have additional classes to modify the float based on the screen size. Instead of `float-` in each class, use `float-{breakpoint}-` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -188,9 +188,9 @@ The table below shows the default behavior, where `{modifier}` is any of the fol
| `.ion-float-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-float-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-## Element Display
+## Element Display {/* #element-display */}
-### Display
+### Display {/* #display */}
The [display](https://developer.mozilla.org/en-US/docs/Web/CSS/display) CSS property sets whether an element is treated as a block or inline box and the layout used for its children, such as flow layout, grid or flex. It can also be used to completely hide an element from the layout.
@@ -210,7 +210,7 @@ Ionic provides the following utility classes for `display`:
| `.ion-display-table-cell` | `display: table-cell` | The element behaves like an HTML `
` element. |
| `.ion-display-table-row` | `display: table-row` | The element behaves like an HTML `
` element. |
-### Responsive Display Classes
+### Responsive Display Classes {/* #responsive-display-classes */}
All of the display classes listed above have additional classes to modify the display based on the screen size. Instead of `display-` in each class, use `display-{breakpoint}-` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -224,7 +224,7 @@ The table below shows the default behavior, where `{modifier}` is any of the fol
| `.ion-display-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-display-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-### Deprecated Classes
+### Deprecated Classes {/* #deprecated-classes */}
:::warning[Deprecation Notice]
@@ -240,9 +240,9 @@ The following classes are deprecated and will be removed in the next major relea
| `.ion-hide-lg-{dir}` | Applies the modifier to the element when `min-width: 992px` (`up`) or `max-width: 992px` (`down`). **Deprecated** — Use the `ion-display-lg-{modifier}` classes instead. |
| `.ion-hide-xl-{dir}` | Applies the modifier to the element when `min-width: 1200px` (`up`) or `max-width: 1200px` (`down`). **Deprecated** — Use the `ion-display-xl-{modifier}` classes instead. |
-## Content Space
+## Content Space {/* #content-space */}
-### Padding
+### Padding {/* #padding */}
The padding class sets the padding area of an element. The padding area is the space between the content of the element and its border.
@@ -292,7 +292,7 @@ The default amount of `padding` to be applied is `16px` and is set by the `--ion
| `.ion-padding-horizontal` | `padding: 0 16px` | Applies padding to the left and right. |
| `.ion-no-padding` | `padding: 0` | Applies no padding to all sides. |
-### Margin
+### Margin {/* #margin */}
The margin area extends the border area with an empty area used to separate the element from its neighbors.
@@ -342,13 +342,13 @@ The default amount of `margin` to be applied is `16px` and is set by the `--ion-
| `.ion-margin-horizontal` | `margin: 0 16px` | Applies margin to the left and right. |
| `.ion-no-margin` | `margin: 0` | Applies no margin to all sides. |
-## Flex Container Properties
+## Flex Container Properties {/* #flex-container-properties */}
Flexbox properties are divided into two categories: **container properties** that control the layout of all flex items, and **item properties** that control individual flex items. Refer to [Flex Item Properties](#flex-item-properties) for item-level alignment.
-### Align Items
+### Align Items {/* #align-items */}
The [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) CSS property sets the [align-self](#align-self) value on all direct children as a group. In flexbox, it controls the alignment of items on the cross axis. In grid layout, it controls the alignment of items on the block axis within their grid areas.
@@ -364,7 +364,7 @@ Ionic provides the following utility classes for `align-items`:
| `.ion-align-items-baseline` | `align-items: baseline` | Items are aligned so that their baselines align. |
| `.ion-align-items-stretch` | `align-items: stretch` | Items are stretched to fill the container. |
-### Align Content
+### Align Content {/* #align-content */}
The [align-content](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content) CSS property sets the distribution of space between and around content items along a flexbox's cross axis, or a grid or block-level element's block axis.
@@ -383,7 +383,7 @@ Ionic provides the following utility classes for `align-content`:
| `.ion-align-content-between` | `align-content: space-between` | Lines are evenly distributed on the cross axis. |
| `.ion-align-content-around` | `align-content: space-around` | Lines are evenly distributed with equal space around them. |
-### Justify Content
+### Justify Content {/* #justify-content */}
The [justify-content](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) CSS property defines how the browser distributes space between and around content items along the main axis of a flex container and the inline axis of grid and multi-column containers.
@@ -400,7 +400,7 @@ Ionic provides the following utility classes for `justify-content`:
| `.ion-justify-content-between` | `justify-content: space-between` | Items are evenly distributed on the main axis. |
| `.ion-justify-content-evenly` | `justify-content: space-evenly` | Items are distributed so that the spacing between any two items is equal. |
-### Flex Direction
+### Flex Direction {/* #flex-direction */}
The [flex-direction](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction) CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
@@ -415,7 +415,7 @@ Ionic provides the following utility classes for `flex-direction`:
| `.ion-flex-column` | `flex-direction: column` | Items are placed vertically. |
| `.ion-flex-column-reverse` | `flex-direction: column-reverse` | Items are placed vertically in reverse order. |
-### Flex Wrap
+### Flex Wrap {/* #flex-wrap */}
The [flex-wrap](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap) CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked.
@@ -429,7 +429,7 @@ Ionic provides the following utility classes for `flex-wrap`:
| `.ion-flex-wrap` | `flex-wrap: wrap` | Items will wrap onto multiple lines, from top to bottom. |
| `.ion-flex-wrap-reverse` | `flex-wrap: wrap-reverse` | Items will wrap onto multiple lines, from bottom to top. |
-### Responsive Flex Container Classes
+### Responsive Flex Container Classes {/* #responsive-flex-container-classes */}
All of the flex container classes listed above have additional classes to modify the properties based on the screen size. Instead of the base class name, use `{property}-{breakpoint}-{modifier}` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -443,7 +443,7 @@ The table below shows the default behavior, where `{property}` is one of the fol
| `.ion-{property}-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-{property}-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-### Deprecated Classes
+### Deprecated Classes {/* #deprecated-classes-1 */}
:::warning[Deprecation Notice]
@@ -457,11 +457,11 @@ The following classes are deprecated and will be removed in the next major relea
| `.ion-wrap` | Items will wrap onto multiple lines, from top to bottom. **Deprecated** — Use `.ion-flex-wrap` instead. |
| `.ion-wrap-reverse` | Items will wrap onto multiple lines, from bottom to top. **Deprecated** — Use `.ion-flex-wrap-reverse` instead. |
-## Flex Item Properties
+## Flex Item Properties {/* #flex-item-properties */}
Flex item properties control how individual flex items behave within their flex container. See also: [Flex Container Properties](#flex-container-properties) for container-level alignment.
-### Align Self
+### Align Self {/* #align-self */}
The [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) CSS property overrides a grid or flex item's align-items value. In grid, it aligns the item inside the grid area. In flexbox, it aligns the item on the cross axis.
@@ -480,7 +480,7 @@ Ionic provides the following utility classes for `align-self`:
| `.ion-align-self-stretch` | `align-self: stretch` | Item is stretched to fill the container. |
| `.ion-align-self-auto` | `align-self: auto` | Item is positioned according to the parent's `align-items` value. |
-### Flex
+### Flex {/* #flex */}
The [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) CSS property is a shorthand property for `flex-grow`, `flex-shrink` and `flex-basis`. It sets how a flex item will grow or shrink to fit the space available in its flex container.
@@ -495,7 +495,7 @@ Ionic provides the following utility classes for `flex`:
| `.ion-flex-initial` | `flex: initial` | Item shrinks to its minimum content size but does not grow. |
| `.ion-flex-none` | `flex: none` | Item does not grow or shrink. |
-### Flex Grow
+### Flex Grow {/* #flex-grow */}
The [flex-grow](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow) CSS property sets the flex grow factor, which specifies how much of the flex container's positive free space, if any, should be assigned to the flex item's main size.
@@ -508,7 +508,7 @@ Ionic provides the following utility classes for `flex-grow`:
| `.ion-flex-grow-0` | `flex-grow: 0` | Item does not grow beyond its content size. |
| `.ion-flex-grow-1` | `flex-grow: 1` | Item grows to fill available space proportionally. |
-### Flex Shrink
+### Flex Shrink {/* #flex-shrink */}
The [flex-shrink](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink) CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, the flex items can shrink to fit according to their `flex-shrink` value. Each flex line's negative free space is distributed between the line's flex items that have a `flex-shrink` value greater than `0`.
@@ -521,7 +521,7 @@ Ionic provides the following utility classes for `flex-shrink`:
| `.ion-flex-shrink-0` | `flex-shrink: 0` | Item does not shrink below its content size. |
| `.ion-flex-shrink-1` | `flex-shrink: 1` | Item shrinks proportionally when container is too small. |
-### Order
+### Order {/* #order */}
The [order](https://developer.mozilla.org/en-US/docs/Web/CSS/order) CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. Items not given an explicit `order` value are assigned the default value of `0`.
@@ -547,7 +547,7 @@ Ionic provides the following utility classes for `order`:
| `.ion-order-12` | `order: 12` | Item appears after items with order 11. |
| `.ion-order-last` | `order: 13` | Item appears last in the flex container. |
-### Responsive Flex Item Classes
+### Responsive Flex Item Classes {/* #responsive-flex-item-classes */}
All of the flex item classes listed above have additional classes to modify the properties based on the screen size. Instead of the base class name, use `{property}-{breakpoint}-{modifier}` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -561,7 +561,7 @@ The table below shows the default behavior, where `{property}` is one of the fol
| `.ion-{property}-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-{property}-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-## Border Display
+## Border Display {/* #border-display */}
The `.ion-no-border` utility class can be used to remove borders from Ionic components. This class can be applied to the `ion-header` and `ion-footer` components.
@@ -583,7 +583,7 @@ The `.ion-no-border` utility class can be used to remove borders from Ionic comp
| ---------------- | -------------------------------- |
| `.ion-no-border` | The element will have no border. |
-## Ionic Breakpoints
+## Ionic Breakpoints {/* #ionic-breakpoints */}
Ionic uses breakpoints in media queries in order to style an application differently based on the screen size. The following breakpoint names are used in the utility classes listed above, where the class will apply when the width is met.
diff --git a/docs/layout/dynamic-font-scaling.mdx b/docs/layout/dynamic-font-scaling.mdx
index 14e95451422..efc82582b42 100644
--- a/docs/layout/dynamic-font-scaling.mdx
+++ b/docs/layout/dynamic-font-scaling.mdx
@@ -2,7 +2,7 @@
Dynamic Font Scaling is a feature that allows users to choose the size of the text displayed on the screen. This helps users who need larger text for better readability, and it also accommodates users who can read smaller text.
-## Try It Out
+## Try It Out {/* #try-it-out */}
:::tip
@@ -18,19 +18,19 @@ import DynamicFontScaling from '@site/static/usage/v10/layout/dynamic-font-scali
-## Using Dynamic Font Scaling
+## Using Dynamic Font Scaling {/* #using-dynamic-font-scaling */}
-### Enabling in an Application
+### Enabling in an Application {/* #enabling-in-an-application */}
Dynamic Font Scaling is enabled by default as long as the [typography.css](/layout/global-stylesheets.mdx#typographycss) file is imported. Importing this file will define the `--ion-dynamic-font` variable which will activate Dynamic Font Scaling. While not recommended, developers can opt-out of Dynamic Font Scaling by setting this variable to `initial` in their application code.
-### Integrating Custom Components
+### Integrating Custom Components {/* #integrating-custom-components */}
Developers can configure their custom components to take advantage of Dynamic Font Scaling by converting any `font-size` declarations that use `px` units to use [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths) instead. An easy way to convert from `px` to `rem` is to divide the pixel font size by the default browser font size, which is typically `16px`. For example, if a component has a font size of `14px`, then this could be converted to `rem` by doing `14px / 16px = 0.875rem`. Also note that any Ionic components that have had their font sizes overridden should also be updated to use `rem` units.
One thing to keep in mind is that the dimensions of your components may need to change to accommodate the larger font sizes. For example, `width` and `height` properties may need to change to `min-width` and `min-height`, respectively. Developers should audit their applications for any CSS properties that use [length values](https://developer.mozilla.org/en-US/docs/Web/CSS/length) and make any applicable conversions from `px` to `rem`. We also recommend having long text wrap to the next line instead of truncating to keep large text readable.
-### Custom Font Family
+### Custom Font Family {/* #custom-font-family */}
We recommend using the default fonts in Ionic as they are designed to look good at any size and ensure consistency with other mobile apps. However, developers can use a custom font family with Dynamic Font Scaling via CSS:
@@ -41,7 +41,7 @@ html {
}
```
-### `em` units versus `rem` units
+### `em` units versus `rem` units {/* #em-units-versus-rem-units */}
Developers have two options for relative font sizes: [`em` and `rem`](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#ems_and_rems).
@@ -93,11 +93,11 @@ In the following example, the computed font size of `.child` is `32px` because t
}
```
-## How Dynamic Font Scaling works in Ionic
+## How Dynamic Font Scaling works in Ionic {/* #how-dynamic-font-scaling-works-in-ionic */}
Ionic components that define font sizes and participate in Dynamic Font Scaling typically use [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths). This sizes the text in each component relative to the font size of the root element, which is usually the `html` element. This means that as the root element's font size changes, the text in all Ionic components scale in a consistent manner. This avoids the need to manually override each component's font size. Some elements inside of these components, such as icons, use `em` units instead so the elements are sized relative to the text, though the text itself is sized using `rem` units.
-### iOS
+### iOS {/* #ios */}
Dynamic Font Scaling in Ionic builds on top of an iOS feature called [Dynamic Type](https://developer.apple.com/documentation/uikit/uifont/scaling_fonts_automatically#overview). To do this, Ionic sets the [font](https://developer.mozilla.org/en-US/docs/Web/CSS/font) of the root element to an Apple-defined text style. For consistency, Ionic uses the [body](https://developer.apple.com/documentation/uikit/uifont/textstyle/1616682-body) text style.
@@ -109,7 +109,7 @@ Ionic follows [Apple's Human Interface Guidelines for Typography](https://develo
2. Components such as `ion-badge` and `ion-back-button` will have minimum font sizes so they remain readable.
3. Text in components such as `ion-tab-bar` and `ion-picker` do not participate in Dynamic Font Scaling according to Apple's Human Interface Guidelines.
-### Android Web View
+### Android Web View {/* #android-web-view */}
The Android Web View's font scaling mechanism is always enabled in web content and will automatically scale font sizes defined using the `px` unit. This means that any maximum or minimum font sizes specified using `px` will still be scaled even if the final font size does not align with the maximum or minimum font sizes specified.
@@ -127,7 +127,7 @@ This is larger than our defined maximum of `14px`, so one might assume that the
As a result, this means that the maximum computed font size is actually `21px` since `14 * 1.5 = 21` and therefore the overall computed font size of `.foo` is `21px`.
-### Chrome for Android
+### Chrome for Android {/* #chrome-for-android */}
The Chrome Web Browser on Android behaves differently than the Android Web View. By default, Chrome for Android does not respect the system-level font scale setting. However, the Chromium team is working on a new feature to allow for this. When enabled, this feature will change the `zoom` level of the `html` element which will cause the layout to increase in size in addition to the text.
@@ -135,7 +135,7 @@ Developers can test this behavior by enabling the experimental "Accessibility Pa
See https://bugs.chromium.org/p/chromium/issues/detail?id=645717 for more information.
-### Using Modes on Different Platforms
+### Using Modes on Different Platforms {/* #using-modes-on-different-platforms */}
Each platform has slightly different font scaling behaviors, and the `ios` and `md` modes have been implemented to take advantage of the scaling behaviors on their respective platforms.
@@ -143,17 +143,17 @@ For example, `ios` mode makes use of maximum and minimum font sizes to follow [A
As a result, we strongly recommend using `ios` mode on iOS devices and `md` mode on Android devices when using Dynamic Font Scaling.
-## Changing the Font Size on a Device
+## Changing the Font Size on a Device {/* #changing-the-font-size-on-a-device */}
Font scaling preferences are configured on a per-device basis by the user. This allows the user to scale the font for all applications that support this behavior. This guide shows how to enable font scaling for each platform.
-### iOS
+### iOS {/* #ios-1 */}
Font scaling on iOS can be configured in the Settings app.
Refer to [Apple Support](https://support.apple.com/en-us/102453) for more information.
-### Android
+### Android {/* #android */}
Where users access the font scaling configuration varies across devices, but it is typically found in the "Accessibility" page in the Settings app.
@@ -163,9 +163,9 @@ The Chrome Web Browser on Android has some limitations with respecting system-le
:::
-## Troubleshooting
+## Troubleshooting {/* #troubleshooting */}
-### Dynamic Font Scaling is not working
+### Dynamic Font Scaling is not working {/* #dynamic-font-scaling-is-not-working */}
There are a number of reasons why Dynamic Font Scaling may not have any effect on an app. The following list, while not exhaustive, provides some things to check to debug why Dynamic Font Scaling is not working.
@@ -175,21 +175,21 @@ There are a number of reasons why Dynamic Font Scaling may not have any effect o
4. Verify that your code does not override font sizes on Ionic components. Ionic components that set `font-size` rules will use `rem` units. However, if your app overrides that to use `px`, then that custom rule will need to be converted to use `rem`. Refer to [Integrating Custom Components](#integrating-custom-components) for more information.
5. Verify "Accessibility Page Zoom" is enabled if using Chrome for Android. Refer to [Chrome for Android](#chrome-for-android) for more information.
-### Maximum and minimum font sizes are not being respected on Android
+### Maximum and minimum font sizes are not being respected on Android {/* #maximum-and-minimum-font-sizes-are-not-being-respected-on-android */}
The Android Web View scales any font sizes defined using the `px` unit by the system-level font scale preference. This means that actual font sizes may be larger or smaller than the font sizes defined in [min()](https://developer.mozilla.org/en-US/docs/Web/CSS/min), [max()](https://developer.mozilla.org/en-US/docs/Web/CSS/max), or [clamp()](https://developer.mozilla.org/en-US/docs/Web/CSS/clamp).
Refer to [how font scaling works on Android](#android) for more information.
-### Font sizes are larger/smaller even with Dynamic Font Scaling disabled
+### Font sizes are larger/smaller even with Dynamic Font Scaling disabled {/* #font-sizes-are-largersmaller-even-with-dynamic-font-scaling-disabled */}
Ionic components define font sizes using [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths) even when Dynamic Font Scaling is disabled. This sizes the text in each component relative to the font size of the root element, which is usually the `html` element. As a result, if the font size of `html` changes, the computed font size of all Ionic components will change too.
-### Scaled Ionic iOS component font sizes do not exactly match native iOS equivalents
+### Scaled Ionic iOS component font sizes do not exactly match native iOS equivalents {/* #scaled-ionic-ios-component-font-sizes-do-not-exactly-match-native-ios-equivalents */}
Certain native iOS components such as the Action Sheet make use of private font scales that Ionic does not have access to. While we try to stay as close as possible to the native behavior, text in some components may render slightly larger or smaller than their native counterparts.
-### The text size in my Ionic app on iOS changed when enabling Dynamic Font Scaling
+### The text size in my Ionic app on iOS changed when enabling Dynamic Font Scaling {/* #the-text-size-in-my-ionic-app-on-ios-changed-when-enabling-dynamic-font-scaling */}
The root element's default font size is typically `16px`. However, Dynamic Font Scaling on iOS devices make use of the ["Body" text style](https://developer.apple.com/design/human-interface-guidelines/typography#Specifications) which has a default font size of `17px`. Since the text in Ionic components is scaled relative to the root element's font size, some text may get larger or smaller when Dynamic Font Scaling is enabled, even if the system-level text scale did not change.
diff --git a/docs/layout/global-stylesheets.mdx b/docs/layout/global-stylesheets.mdx
index 1075494da54..28ffbac6189 100644
--- a/docs/layout/global-stylesheets.mdx
+++ b/docs/layout/global-stylesheets.mdx
@@ -12,60 +12,60 @@ title: Global Stylesheets
While Ionic Framework component styles are self-contained, there are several global stylesheets that should be included in order to use all of Ionic's features. Some of the stylesheets are required in order for an Ionic Framework app to look and behave properly, and others include optional utilities to quickly style your app.
-## Available
+## Available {/* #available */}
-### Required
+### Required {/* #required */}
The following CSS file must be included in order for Ionic Framework to work properly.
-#### core.css
+#### core.css {/* #corecss */}
This file is the only stylesheet that is required in order for Ionic components to work properly. It includes app specific styles, and allows the `color` property to work across components. If this file is not included the colors will not show up and some elements may not appear properly.
-### Recommended
+### Recommended {/* #recommended */}
The following CSS files are recommended to be included in an Ionic Framework app. If they are not included, some elements may have undesired styles. If Ionic Framework components are being used outside of an app, these files may not be necessary.
-#### structure.css
+#### structure.css {/* #structurecss */}
Applies styles to `` and defaults `box-sizing` to `border-box`. It ensures scrolling behaves like native in mobile devices.
-#### typography.css
+#### typography.css {/* #typographycss */}
Typography changes the font-family of the entire document and modifies the font styles for heading elements. It also applies positioning styles to some native text elements. This file is necessary for [Dynamic Font Scaling](./dynamic-font-scaling) to work.
-#### normalize.css
+#### normalize.css {/* #normalizecss */}
Makes browsers render all elements more consistently and in line with modern standards. It is based on [Normalize.css](https://necolas.github.io/normalize.css/).
-### Optional
+### Optional {/* #optional */}
The following set of CSS files are optional and can safely be commented out or removed if the application is not using any of the features.
-#### padding.css
+#### padding.css {/* #paddingcss */}
Adds utility classes to modify the padding or margin on any element, refer to [CSS Utilities](css-utilities.mdx#content-space) for usage information.
-#### float-elements.css
+#### float-elements.css {/* #float-elementscss */}
Adds utility classes to float an element based on the breakpoint and side, refer to [CSS Utilities](css-utilities.mdx#element-placement) for usage information.
-#### text-alignment.css
+#### text-alignment.css {/* #text-alignmentcss */}
Adds utility classes to align the text of an element or adjust the white space based on the breakpoint, refer to [CSS Utilities](css-utilities.mdx#text-align) for usage information.
-#### text-transformation.css
+#### text-transformation.css {/* #text-transformationcss */}
Adds utility classes to transform the text of an element to `uppercase`, `lowercase` or `capitalize` based on the breakpoint, refer to [CSS Utilities](css-utilities.mdx#text-transform) for usage information.
-#### flex-utils.css
+#### flex-utils.css {/* #flex-utilscss */}
Adds utility classes to align flex containers and items, refer to [CSS Utilities](css-utilities.mdx#flex-container-properties) for usage information.
-#### display.css
+#### display.css {/* #displaycss */}
Adds utility classes to hide any element based on the breakpoint, refer to [CSS Utilities](css-utilities.mdx#element-display) for usage information.
-## Usage
+## Usage {/* #usage */}
Refer to [Ionic Packages](../intro/cdn.mdx) for how to include the global stylesheets based on the framework and [CSS Utilities](css-utilities.mdx) for how to use the optional utilities.
diff --git a/docs/layout/structure.mdx b/docs/layout/structure.mdx
index 6ef346fd9c8..ef8c6c7285d 100644
--- a/docs/layout/structure.mdx
+++ b/docs/layout/structure.mdx
@@ -15,9 +15,9 @@ import DocsCards from '@components/global/DocsCards';
Ionic Framework provides several different layouts that can be used to structure an app. From single page layouts, to split pane views and modals.
-## Header and Footer Layout
+## Header and Footer Layout {/* #header-and-footer-layout */}
-### Header
+### Header {/* #header */}
The most simple layout available consists of a [header](../api/header.mdx) and [content](../api/content.mdx). Most pages in an app generally have both of these, but a header is not required in order to use content.
@@ -25,7 +25,7 @@ import Header from '@site/static/usage/v10/header/basic/index.mdx';
-### Footer
+### Footer {/* #footer */}
While a toolbar in a header appears above the content, a footer appears below the content. A header and a footer can also be used together on the same page.
@@ -33,7 +33,7 @@ import Footer from '@site/static/usage/v10/footer/basic/index.mdx';
-## Tabs Layout
+## Tabs Layout {/* #tabs-layout */}
A layout consisting of horizontal [tabs](../api/tabs.mdx) can be used to let the user quickly change between content views. Each tab can contain static content or a navigation stack by using a [router outlet](../api/router-outlet.mdx) or [nav](../api/nav.mdx).
@@ -41,7 +41,7 @@ import Tabs from '@site/static/usage/v10/tabs/router/index.mdx';
-## Menu Layout
+## Menu Layout {/* #menu-layout */}
A standard layout among mobile apps includes the ability to toggle a side [menu](../api/menu.mdx) by clicking a button or swiping it open from the side. Side menus are generally used for navigation, but they can contain any content.
@@ -49,7 +49,7 @@ import Menu from '@site/static/usage/v10/menu/basic/index.mdx';
-## Split Pane Layout
+## Split Pane Layout {/* #split-pane-layout */}
A [split pane](../api/split-pane.mdx) layout has a more complex structure because it can combine the previous layouts. It allows for multiple views to be displayed when the viewport is above a specified breakpoint. If the device's screen size is below a certain size, the split pane view will be hidden.
diff --git a/docs/native-faq.mdx b/docs/native-faq.mdx
index 10c8a9eadfb..3251f29cd22 100644
--- a/docs/native-faq.mdx
+++ b/docs/native-faq.mdx
@@ -5,11 +5,11 @@ slug: /native/faq
# Frequently Asked Question
-## What is Capacitor?
+## What is Capacitor? {/* #what-is-capacitor */}
Capacitor is a native runtime built by the Ionic team that offers web developers the ability to deploy their web apps to a native device. Capacitor is also exposing native device capabilities through JavaScript so developers can access features like native location services, filesystem access, or notifications as if they are interacting with any other JavaScript library.
-## Permission Issues
+## Permission Issues {/* #permission-issues */}
If you're using a plugin, it may require adding additional permissions to your native project after you install the plugin. For instance, the Capacitor Camera plugin requires the following permission for iOS:
@@ -19,6 +19,6 @@ If you're using a plugin, it may require adding additional permissions to your n
You need to manually add those permissions to the `info.plist` in your native project. Otherwise, calls to the native camera API will fail.
-## Unexpected behavior
+## Unexpected behavior {/* #unexpected-behavior */}
If for some reason the plugin does not behave in a way that is unexpected, please [open an issue on our github repo](https://github.com/ionic-team/capacitor-plugins)! Providing a clear issue report along with a reproduction can help get your issue resolved.
diff --git a/docs/native-setup.mdx b/docs/native-setup.mdx
index 03a10ea2864..e4889b192fb 100644
--- a/docs/native-setup.mdx
+++ b/docs/native-setup.mdx
@@ -24,7 +24,7 @@ import TabItem from '@theme/TabItem';
Getting started with Capacitor is fairly straight forward for Ionic developers. Adding plugins to your project is no different than adding any dependencies you may need to a project.
-## Install
+## Install {/* #install */}
To install a plugin, find the plugin you want to use and install it using your package manager, like npm:
@@ -33,7 +33,7 @@ To install a plugin, find the plugin you want to use and install it using your p
$ npm install @capacitor/camera
```
-## Usage
+## Usage {/* #usage */}
Once installed, plugins can be imported into a component and you can call the native functionality directly from your code.
diff --git a/docs/react/add-to-existing.mdx b/docs/react/add-to-existing.mdx
index 95d08079546..d74edc57776 100644
--- a/docs/react/add-to-existing.mdx
+++ b/docs/react/add-to-existing.mdx
@@ -22,7 +22,7 @@ This guide uses TypeScript examples. If you're using JavaScript, the setup proce
:::
-## Setup
+## Setup {/* #setup */}
:::info
@@ -32,13 +32,13 @@ This guide follows the structure of a React app created with Vite. If you starte
Follow these steps to add Ionic React to your existing React project:
-#### 1. Install the Package
+#### 1. Install the Package {/* #1-install-the-package */}
```bash
npm install @ionic/react
```
-#### 2. Configure Ionic React
+#### 2. Configure Ionic React {/* #2-configure-ionic-react */}
Update `src/App.tsx` to include `setupIonicReact` and import the required Ionic Framework stylesheets:
@@ -68,7 +68,7 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography.
:::
-## Using Individual Components
+## Using Individual Components {/* #using-individual-components */}
After completing the setup above, you can start using Ionic components in your existing React app. Here's an example of how to use them:
@@ -106,11 +106,11 @@ If your existing React app imports a global stylesheet (such as `index.css`) in
:::
-## Using Ionic Pages
+## Using Ionic Pages {/* #using-ionic-pages */}
If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
-#### 1. Add Additional Ionic Framework Stylesheets
+#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
Update the imported stylesheets in `src/App.tsx`:
@@ -134,7 +134,7 @@ import '@ionic/react/css/display.css';
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 {/* #2-set-up-theming */}
Create a `src/theme/variables.css` file with the following content:
@@ -171,7 +171,7 @@ setupIonicReact();
The `variables.css` file can be used to create custom Ionic Framework themes. The `dark.system.css` import 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 to `theme/variables.css`.
-#### 3. Update the App Component
+#### 3. Update the App Component {/* #3-update-the-app-component */}
Update `src/App.tsx` to the following:
@@ -224,7 +224,7 @@ const App = () => {
export default App;
```
-#### 4. Create a Home Page
+#### 4. Create a Home Page {/* #4-create-a-home-page */}
Create a new file at `src/pages/Home.tsx` with the following:
@@ -298,7 +298,7 @@ Then, create `src/pages/Home.css`:
}
```
-#### 5. Set up Routing
+#### 5. Set up Routing {/* #5-set-up-routing */}
:::important
@@ -340,7 +340,7 @@ export default App;
You're all set! Your Ionic React app is now configured with full Ionic page support. Run `npm run dev` to start your development server and view your app.
-## Next Steps
+## Next Steps {/* #next-steps */}
Now that you have Ionic React integrated into your project, check out:
diff --git a/docs/react/lifecycle.mdx b/docs/react/lifecycle.mdx
index 3501dec7cd7..da588fecda9 100644
--- a/docs/react/lifecycle.mdx
+++ b/docs/react/lifecycle.mdx
@@ -13,7 +13,7 @@ sidebar_label: Lifecycle
This guide discusses how to use the Ionic Lifecycle events in an Ionic React application.
-## Ionic Lifecycle Methods
+## Ionic Lifecycle Methods {/* #ionic-lifecycle-methods */}
Ionic provides a few lifecycle methods that you can use in your apps:
@@ -28,7 +28,7 @@ These lifecycles are only called on components directly mapped by a router. This
The way you access these methods varies based on if you are using class-based components or functional components. We cover both methods below.
-## Lifecycle Methods in Class-Based Components
+## Lifecycle Methods in Class-Based Components {/* #lifecycle-methods-in-class-based-components */}
to use the Ionic Lifecycle methods in a class-based component, you must wrap your component with the `withIonLifeCycle` higher order component (HOC) like so:
@@ -82,7 +82,7 @@ class HomePage extends React.Component {
export default withIonLifeCycle(HomePage);
```
-## Lifecycle Methods in Functional Components
+## Lifecycle Methods in Functional Components {/* #lifecycle-methods-in-functional-components */}
Ionic React exports hooks for each of the lifecycle methods that you can use in your functional components. Each of the hooks takes the method you want called when the event fires.
@@ -147,11 +147,11 @@ useIonViewDidEnter(() => {
}, [data]);
```
-## React LifeCycle Methods
+## React LifeCycle Methods {/* #react-lifecycle-methods */}
All the lifecycle methods in React (`componentDidMount`, `componentWillUnmount`, etc..) are available for you to use as well. However, since Ionic React manages the lifetime of a page, certain events might not fire when you expect them to. For instance, `componentDidMount` fires the first time a page is displayed, but if you navigate away from the page Ionic might keep the page around in the DOM, and a subsequent visit to the page might not call `componentDidMount` again. This scenario is the main reason the Ionic lifecycle methods exist, to still give you a way to call logic when views enter and exit when the native framework's events might not fire.
-## Guidance for Each LifeCycle Method
+## Guidance for Each LifeCycle Method {/* #guidance-for-each-lifecycle-method */}
Below are some tips on use cases for each of the life cycle events.
@@ -160,7 +160,7 @@ Below are some tips on use cases for each of the life cycle events.
- `ionViewWillLeave` - Can be used for cleanup, like unsubscribing from data sources. Since `componentWillUnmount` might not fire when you navigate from the current page, put your cleanup code here if you don't want it active while the screen is not in view.
- `ionViewDidLeave` - When this event fires, you know the new page has fully transitioned in, so any logic you might not normally do when the view is visible can go here.
-## Passing state between pages
+## Passing state between pages {/* #passing-state-between-pages */}
Since Ionic React manages the lifetime of a page, state on previous pages may update as users navigate your application. This can impact state that is determined using `useEffect` from React or `useLocation` from React Router. For example, if `PageA` calls `useLocation`, the state of `useLocation` will change when the user navigates from `PageA` to `PageB`.
diff --git a/docs/react/navigation.mdx b/docs/react/navigation.mdx
index e77d3adfbfe..c95454d2d87 100644
--- a/docs/react/navigation.mdx
+++ b/docs/react/navigation.mdx
@@ -19,7 +19,7 @@ This guide covers how routing works in an app built with Ionic and React.
Everything you know about routing using React Router carries over into Ionic React. Let's walk through the basics of an Ionic React app and how routing works with it.
-## Routing in Ionic React
+## Routing in Ionic React {/* #routing-in-ionic-react */}
Here is a sample `App` component that defines a single route to the "/dashboard" URL. When you visit "/dashboard", the route renders the `DashboardPage` component.
@@ -46,11 +46,11 @@ You can also conditionally redirect based on a condition, like checking if a use
: } />
```
-## IonReactRouter
+## IonReactRouter {/* #ionreactrouter */}
The `IonReactRouter` component wraps the traditional [`BrowserRouter`](https://reactrouter.com/6.28.0/router-components/browser-router) component from React Router, and sets the app up for routing. Therefore, use `IonReactRouter` in place of `BrowserRouter`. You can pass in any props to `IonReactRouter` and they will be passed down to the underlying `BrowserRouter`.
-## Nested Routes
+## Nested Routes {/* #nested-routes */}
Inside the Dashboard page, we define more routes related to this specific section of the app:
@@ -71,9 +71,9 @@ Note the `ionPage` prop on `IonRouterOutlet`. When a component serves as a neste
These routes are grouped in an `IonRouterOutlet`, let's discuss that next.
-## Components
+## Components {/* #components */}
-### IonRouterOutlet
+### IonRouterOutlet {/* #ionrouteroutlet */}
The `IonRouterOutlet` component provides a container for Routes that render Ionic "pages". When a page is in an `IonRouterOutlet`, the container controls the transition animation between the pages as well as controls when a page is created and destroyed, which helps maintain the state between the views when switching back and forth between them.
@@ -81,7 +81,7 @@ The `DashboardPage` above shows a users list page and a details page. When navig
An `IonRouterOutlet` should only contain `Route`s. Any other component should be rendered either as a result of a `Route` or outside of the `IonRouterOutlet`.
-### Fallback Route
+### Fallback Route {/* #fallback-route */}
A common routing use case is to provide a "fallback" route to be rendered in the event the location navigated to does not match any of the routes defined.
@@ -113,7 +113,7 @@ const DashboardPage: React.FC = () => (
);
```
-### IonPage
+### IonPage {/* #ionpage */}
The `IonPage` component wraps each view in an Ionic React app and allows page transitions and stack navigation to work properly. Each view that is navigated to using the router must include an `IonPage` component.
@@ -138,7 +138,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Navigation
+## Navigation {/* #navigation */}
There are several options available when routing to different views in an Ionic React app. Here, the `UsersListPage` uses `IonItem`'s `routerLink` prop to specify the route to go to when the item is tapped/clicked:
@@ -201,7 +201,7 @@ const MyComponent: React.FC = () => {
};
```
-### Navigating using `navigate` with delta
+### Navigating using `navigate` with delta {/* #navigating-using-navigate-with-delta */}
React Router's `navigate` function can accept a delta number to move forward or backward through the application history.
@@ -213,7 +213,7 @@ If you were to call `navigate(-2)` on `/pageC`, you would be brought back to `/p
Using `navigate()` with delta values is not recommended in Ionic React because it follows the browser's linear history, which does not account for Ionic's non-linear tab and nested outlet navigation stacks. Use the `useIonRouter` hook's [`goBack()`](./utility-functions.mdx#back-navigation) method instead, which navigates within the current Ionic navigation stack.
-## URL Parameters
+## URL Parameters {/* #url-parameters */}
The second route defined in the Dashboard Page has a URL parameter defined (the ":id" portion in the path). URL parameters are dynamic portions of the `path`, and when the user navigates to a URL such as "/dashboard/users/1", the "1" is saved to a parameter named "id", which can be accessed in the component the route renders. Let's walk through how that's done.
@@ -242,9 +242,9 @@ The [`useParams`](https://reactrouter.com/6.28.0/hooks/use-params) hook returns
Note how we use a TypeScript generic to strongly type the params object. This gives us type safety and code completion inside of the component.
-## Linear Routing versus Non-Linear Routing
+## Linear Routing versus Non-Linear Routing {/* #linear-routing-versus-non-linear-routing */}
-### Linear Routing
+### Linear Routing {/* #linear-routing */}
If you have built a web app that uses routing, you likely have used linear routing before. Linear routing means that you can move forward or backward through the application history by pushing and popping pages.
@@ -268,7 +268,7 @@ When we press the back button, we follow that same routing path except in revers
The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.
-### Non-Linear Routing
+### Non-Linear Routing {/* #non-linear-routing */}
Non-linear routing is a concept that may be new to many web developers learning to build mobile apps with Ionic.
@@ -296,7 +296,7 @@ If tapping the back button simply called `navigate(-1)` from the `Ted Lasso` vie
Non-linear routing allows for sophisticated user flows that linear routing cannot handle. However, certain linear routing APIs such as `navigate()` with delta values cannot be used in this non-linear environment. This means that `navigate(-1)` or similar delta navigation should not be used when using tabs or nested outlets.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose */}
We recommend keeping your application as simple as possible until you need to add non-linear routing. Non-linear routing is very powerful, but it also adds a considerable amount of complexity to mobile applications.
@@ -306,11 +306,11 @@ For more on tabs, refer to [Working with Tabs](#working-with-tabs).
For more on nested router outlets, refer to [Nested Routes](#nested-routes).
-## Shared URLs versus Nested Routes
+## Shared URLs versus Nested Routes {/* #shared-urls-versus-nested-routes */}
A common point of confusion when setting up routing is deciding between shared URLs or nested routes. This part of the guide will explain both and help you decide which one to use.
-### Shared URLs
+### Shared URLs {/* #shared-urls */}
Shared URLs is a route configuration where routes have pieces of the URL in common. The following is an example of a shared URL configuration:
@@ -329,7 +329,7 @@ const App: React.FC = () => (
The above routes are considered "shared" because they reuse the `dashboard` piece of the URL. Since these routes are flat siblings in the same `IonRouterOutlet` (not nested), they don't need a `/*` suffix.
-### Nested Routes
+### Nested Routes {/* #nested-routes-1 */}
Nested Routes is a route configuration where routes are listed as children of other routes. The following is an example of a nested route configuration:
@@ -354,7 +354,7 @@ const DashboardRouterOutlet: React.FC = () => (
The above routes are nested because they are rendered inside the `DashboardRouterOutlet` component, which is a child of the parent route. The parent route uses a `/*` suffix to match all sub-paths, and the nested `IonRouterOutlet` renders the appropriate child route.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose-1 */}
Shared URLs are great when you want to transition from page A to page B while preserving the relationship between the two pages in the URL. In our previous example, a button on the `/dashboard` page could transition to the `/dashboard/stats` page. The relationship between the two pages is preserved because of a) the page transition and b) the url.
@@ -362,7 +362,7 @@ Nested routes should be used when you want to render content in outlet A while a
There are very few use cases in which nested routes make sense in mobile applications. When in doubt, use the shared URL route configuration. We strongly caution against using nested routing in contexts other than tabs as it can quickly make navigating your app confusing.
-## Working with Tabs
+## Working with Tabs {/* #working-with-tabs */}
When working with tabs, Ionic needs a way to know which view belongs to which tab. The `IonTabs` component comes in handy here, but let's examine the routing setup for this:
@@ -425,7 +425,7 @@ If you have worked with Ionic Framework before, this should feel familiar. We cr
:::
-### How Tabs in Ionic Work
+### How Tabs in Ionic Work {/* #how-tabs-in-ionic-work */}
Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
@@ -433,7 +433,7 @@ This behavior is important to note as it is different than most tab implementati
Since Ionic is focused on helping developers build mobile apps, the tabs in Ionic are designed to match native mobile tabs as closely as possible. As a result, there may be certain behaviors in Ionic's tabs that differ from tabs implementations in other UI libraries. Read on to learn more about some of these differences.
-### Child Routes within Tabs
+### Child Routes within Tabs {/* #child-routes-within-tabs */}
When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `tab1/view` route as a sibling of the `tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `IonTabBar`.
@@ -463,7 +463,7 @@ When adding additional routes to tabs you should write them as sibling routes wi
```
-### Switching Between Tabs
+### Switching Between Tabs {/* #switching-between-tabs */}
Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
@@ -501,13 +501,13 @@ The example below shows how the Spotify app reuses the same album component to s
| :-------------------------------------------------: | :---------------------------------------------------: |
| | |
-## Live Example
+## Live Example {/* #live-example */}
import NavigationPlayground from '@site/static/usage/v10/navigation/index.mdx';
-### IonRouterOutlet in a Tabs View
+### IonRouterOutlet in a Tabs View {/* #ionrouteroutlet-in-a-tabs-view */}
When working in a tabs view, Ionic React needs a way to determine what views belong to which tabs. It does this by matching the path prefix of each route.
@@ -523,7 +523,7 @@ For example, the routes for a view with two tabs (sessions and speakers) can be
When a user navigates to a session detail page ("/sessions/1" for instance), `IonRouterOutlet` sees that both the list and detail pages share the same "sessions" path prefix and provides an animated page transition to the new view. If a user navigates to a different tab ("speakers" in this case), `IonRouterOutlet` knows not to provide the animation.
-## More Information
+## More Information {/* #more-information */}
For more info on routing in React using the React Router implementation that Ionic uses under the hood, check out their docs at [https://reactrouter.com/6.28.0](https://reactrouter.com/6.28.0).
diff --git a/docs/react/overlays.mdx b/docs/react/overlays.mdx
index da08888461b..6bef22fbe11 100644
--- a/docs/react/overlays.mdx
+++ b/docs/react/overlays.mdx
@@ -6,7 +6,7 @@ sidebar_label: Overlays
For Ionic React, there are two techniques you can use to display overlay components like modals, alerts, action sheets, etc. In this guide, we will go over both of them.
-## Overlay Hooks
+## Overlay Hooks {/* #overlay-hooks */}
Starting in Ionic React 5.6, we introduced new React hooks you can use to control displaying and dismissing overlays. These hooks provide a programmatic way of controlling the overlays, as well as a way to use overlays outside of your Ionic Page without the need of a state management system.
@@ -66,7 +66,7 @@ const [present, dismiss] = useIonModal(Greeting, { name: 'Dave' });
Passing a JSX element instead of a component binds the props to the element, and `componentProps` is not type checked.
-## Overlay Components
+## Overlay Components {/* #overlay-components */}
Overlays can also be displayed by using components from `@ionic/react`. The components take a `isOpen` prop that you provide to control if the overlay is currently being displayed or not. When `isOpen` switches from true to false (and vise versa), Ionic will open/close the overlay with the appropriate animation. You can also supply any other additional config options as props to the overlay:
@@ -92,7 +92,7 @@ The Overlay Components are still a valid way of displaying overlays and are in n
:::
-## Docs for Overlays in Ionic
+## Docs for Overlays in Ionic {/* #docs-for-overlays-in-ionic */}
For full docs and usage examples for both the hook and component approach, visit the docs page for each of the overlays in Ionic:
diff --git a/docs/react/overview.mdx b/docs/react/overview.mdx
index 178ee6af6cd..c355aae9375 100644
--- a/docs/react/overview.mdx
+++ b/docs/react/overview.mdx
@@ -16,19 +16,19 @@ import DocsCards from '@components/global/DocsCards';
`@ionic/react` brings the full power of the Ionic Framework to React developers. It offers seamless integration with the React ecosystem, so you can build high-quality cross-platform apps using familiar React tools, components, and best practices. You also get access to Ionic's extensive UI library and native capabilities.
-## React Version Support
+## React Version Support {/* #react-version-support */}
Ionic React supports the latest versions of React. For detailed information on supported versions and our support policy, refer to the [Ionic React Support Policy](/reference/support.mdx#ionic-react).
-## React Tooling
+## React Tooling {/* #react-tooling */}
Ionic React works seamlessly with the React CLI and popular React tooling. You can use your favorite libraries for state management, testing, and more. Ionic React is designed to fit naturally into the React ecosystem, so you can use tools like Create React App, Vite, or Next.js to scaffold and build your apps.
-## Native Tooling
+## Native Tooling {/* #native-tooling */}
[Capacitor](https://capacitorjs.com) is the official cross-platform runtime for Ionic Angular, enabling your apps to run natively on iOS, Android, and the web with a single codebase.
-## Installation
+## Installation {/* #installation */}
```shell-session
$ npm install -g @ionic/cli
@@ -38,7 +38,7 @@ $ cd myApp
$ ionic serve █
```
-## Resources
+## Resources {/* #resources */}
diff --git a/docs/react/performance.mdx b/docs/react/performance.mdx
index c5d029b11aa..013614bc59a 100644
--- a/docs/react/performance.mdx
+++ b/docs/react/performance.mdx
@@ -11,7 +11,7 @@ sidebar_label: Performance
/>
-## Loops with Ionic Components
+## Loops with Ionic Components {/* #loops-with-ionic-components */}
When using loops with Ionic components, we recommend using React's `key` attribute. This allows React to re-render loop elements in an efficient way by only updating the content inside of the component rather than re-creating the component altogether.
diff --git a/docs/react/platform.mdx b/docs/react/platform.mdx
index eb391d04795..83d1a62e597 100644
--- a/docs/react/platform.mdx
+++ b/docs/react/platform.mdx
@@ -1,6 +1,6 @@
# Platform
-## isPlatform
+## isPlatform {/* #isplatform */}
The `isPlatform` method can be used to test if your app is running on a certain platform:
@@ -12,7 +12,7 @@ isPlatform('ios'); // returns true when running on a iOS device
Depending on the platform the user is on, isPlatform(platformName) will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: mobile, ios, ipad, and tablet. Additionally, if the app was running from Cordova then cordova would be true.
-## getPlatforms
+## getPlatforms {/* #getplatforms */}
The `getPlatforms` method can be used to determine which platforms your app is currently running on.
@@ -24,7 +24,7 @@ getPlatforms(); // returns ["iphone", "ios", "mobile", "mobileweb"] from an iPho
Depending on what device you are on, `getPlatforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return mobile, ios, and iphone.
-## Platforms
+## Platforms {/* #platforms */}
Below is a table listing all the possible platform values along with corresponding descriptions.
@@ -45,7 +45,7 @@ Below is a table listing all the possible platform values along with correspondi
| pwa | a PWA app |
| tablet | a tablet device |
-## Customizing Platform Detection Functions
+## 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.
diff --git a/docs/react/pwa.mdx b/docs/react/pwa.mdx
index d7d74f57fd1..9ffbcfe2afc 100644
--- a/docs/react/pwa.mdx
+++ b/docs/react/pwa.mdx
@@ -11,7 +11,7 @@ sidebar_label: Progressive Web Apps
/>
-## Making your React app a PWA with Vite
+## Making your React app a PWA with Vite {/* #making-your-react-app-a-pwa-with-vite */}
The two main requirements of a PWA are a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) and a [Web Application Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/). While it's possible to add both of these to an app manually, we recommend using the [Vite PWA Plugin](https://vite-pwa-org.netlify.app/) instead.
@@ -39,7 +39,7 @@ For more information on configuring the Vite PWA Plugin, refer to the [Vite PWA
Refer to the [Vite PWA "Deploy" Guide](https://vite-pwa-org.netlify.app/deployment/) for information on how to deploy your PWA.
-## Making your React app a PWA with Create React App
+## Making your React app a PWA with Create React App {/* #making-your-react-app-a-pwa-with-create-react-app */}
:::note
@@ -85,15 +85,15 @@ Features like Service Workers and many JavaScript APIs (such as geolocation) req
:::
-### Service Worker configuration
+### Service Worker configuration {/* #service-worker-configuration */}
By default, CRA/React Scripts come with a preconfigured Service Worker setup based on [Workbox's Webpack plugin](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin). This utilizes a cache-first strategy, meaning that your app will load from a cache, even if the network returns a newer version of the app.
Because of the nature of CRA/React Scripts, the configuration for this is internal to React Scripts, meaning that it cannot be customized without ejecting from React Scripts. Currently, the Ionic CLI does not support an ejected React App, so if this action is taken, you'll need to use npm/yarn scripts instead of the Ionic CLI.
-### Deploying
+### Deploying {/* #deploying */}
-#### Firebase
+#### Firebase {/* #firebase */}
Firebase hosting provides many benefits for Progressive Web Apps, including fast response times thanks to CDNs, HTTPS enabled by default, and support for [HTTP2 push](https://firebase.googleblog.com/2016/09/http2-comes-to-firebase-hosting.html).
diff --git a/docs/react/quickstart.mdx b/docs/react/quickstart.mdx
index 3bd67d309c3..972203a096a 100644
--- a/docs/react/quickstart.mdx
+++ b/docs/react/quickstart.mdx
@@ -18,7 +18,7 @@ Welcome! This guide will walk you through the basics of Ionic React development.
If you're looking for a high-level overview of what Ionic React is and how it fits into the React ecosystem, refer to the [Ionic React Overview](overview).
-## Prerequisites
+## Prerequisites {/* #prerequisites */}
Before you begin, make sure you have Node.js and npm installed on your machine.
You can check by running:
@@ -30,7 +30,7 @@ npm -v
If you don't have Node.js and npm, [download Node.js](https://nodejs.org/en/download) (which includes npm).
-## Create a Project with the Ionic CLI
+## Create a Project with the Ionic CLI {/* #create-a-project-with-the-ionic-cli */}
First, install the latest [Ionic CLI](../cli):
@@ -51,7 +51,7 @@ After running `ionic serve`, your project will open in the browser.

-## Explore the Project Structure
+## Explore the Project Structure {/* #explore-the-project-structure */}
Your new app's directory will look like this:
@@ -75,7 +75,7 @@ All file paths in the examples below are relative to the project root directory.
Let's walk through these files to understand the app's structure.
-## View the App Component
+## View the App Component {/* #view-the-app-component */}
The root of your app is defined in `App.tsx`:
@@ -105,7 +105,7 @@ export default App;
This sets up the root of your application, using Ionic's `IonApp` and `IonReactRouter` components. The `IonRouterOutlet` is where your pages will be displayed.
-## View Routes
+## View Routes {/* #view-routes */}
Routes are defined within the `IonRouterOutlet` in `App.tsx`:
@@ -118,7 +118,7 @@ Routes are defined within the `IonRouterOutlet` in `App.tsx`:
When you visit the root URL (`/`), the `Home` component will be loaded.
-## View the Home Page
+## View the Home Page {/* #view-the-home-page */}
The Home page component, defined in `Home.tsx`, imports the Ionic components and defines the page template:
@@ -158,7 +158,7 @@ For detailed information about Ionic layout components, refer to the [Header](/a
:::
-## Add an Ionic Component
+## Add an Ionic Component {/* #add-an-ionic-component */}
You can enhance your Home page with more Ionic UI components. For example, import and add a [Button](/api/button.mdx) at the end of the `IonContent` in `Home.tsx`:
@@ -186,7 +186,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Add a New Page
+## Add a New Page {/* #add-a-new-page */}
Create a new page at `New.tsx`:
@@ -226,7 +226,7 @@ When creating your own pages, always use `IonPage` as the root component. This i
:::
-## Navigate to the New Page
+## Navigate to the New Page {/* #navigate-to-the-new-page */}
To navigate to the new page, create a route for it by first importing it at the top of `App.tsx` after the `Home` import:
@@ -256,7 +256,7 @@ Navigating can also be performed programmatically using the `useIonRouter` hook.
:::
-## Add Icons to the New Page
+## Add Icons to the New Page {/* #add-icons-to-the-new-page */}
Ionic React comes with [Ionicons](https://ionic.io/ionicons/) pre-installed. You can use any icon by setting the `icon` property of the `IonIcon` component.
@@ -278,7 +278,7 @@ Note that we are passing the imported SVG reference, **not** the icon name as a
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 {/* #call-component-methods */}
Let's add a button that can scroll the content area to the bottom.
@@ -331,7 +331,7 @@ This pattern is necessary because React refs store the component instance in the
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 {/* #run-on-a-device */}
Ionic's components work everywhere: on iOS, Android, and PWAs. To deploy to mobile, use [Capacitor](https://capacitorjs.com):
@@ -350,7 +350,7 @@ ionic cap open android
Refer to [Capacitor's Getting Started guide](https://capacitorjs.com/docs/getting-started/with-ionic) for more.
-## Explore More
+## Explore More {/* #explore-more */}
This guide covered the basics of creating an Ionic React app, adding navigation, and introducing Capacitor for native builds. To dive deeper, check out:
diff --git a/docs/react/slides.mdx b/docs/react/slides.mdx
index e5dffb8625d..d6625d33c44 100644
--- a/docs/react/slides.mdx
+++ b/docs/react/slides.mdx
@@ -26,7 +26,7 @@ Using Swiper's React component is **not** required to use Swiper.js with Ionic F
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
First, update to the latest version of Ionic:
@@ -46,7 +46,7 @@ Developers using Create React App must use `react-scripts` v5.0.0+ with the late
:::
-## Swiping with Style
+## Swiping with Style {/* #swiping-with-style */}
Next, we need to import the base Swiper styles. We are also going to import the styles that Ionic provides which will let us customize the Swiper styles using the same CSS Variables that we used with `IonSlides`.
@@ -74,7 +74,7 @@ Importing `@ionic/react/css/ionic-swiper.css` is **not** required to use Swiper.
:::
-### Updating Selectors
+### Updating Selectors {/* #updating-selectors */}
Previously, we were able to target `ion-slides` and `ion-slide` to apply any custom styling. The contents of those style blocks remain the same, but we need to update the selectors. Below is a list of selector changes when going from `ion-slides` to Swiper React:
@@ -83,7 +83,7 @@ Previously, we were able to target `ion-slides` and `ion-slide` to apply any cus
| `ion-slides` | `.swiper` |
| `ion-slide` | `.swiper-slide` |
-### Pre-processors (optional)
+### Pre-processors (optional) {/* #pre-processors-optional */}
For developers using SCSS or Less styles, Swiper also provides imports for those files.
@@ -123,7 +123,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Using Components
+## Using Components {/* #using-components */}
Swiper exports two components: `Swiper` and `SwiperSlide`. The `Swiper` component is the equivalent of `IonSlides`, and `SwiperSlide` is the equivalent of `IonSlide`.
@@ -153,7 +153,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Using Modules
+## Using Modules {/* #using-modules */}
By default, Swiper for React does not import any additional modules. To use modules such as Navigation or Pagination, you need to import them first.
@@ -268,7 +268,7 @@ Refer to [Swiper's React usage documentation](https://swiperjs.com/react#usage)
:::
-## The IonicSlides Module
+## The IonicSlides Module {/* #the-ionicslides-module */}
With `IonSlides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
@@ -319,7 +319,7 @@ The `IonicSlides` module must be the last module in the array. This will let it
:::
-## Properties
+## Properties {/* #properties */}
Swiper options are provided as props directly on the `` component rather than via the `options` object in `IonSlides`.
@@ -371,7 +371,7 @@ All properties available in Swiper React can be found in the [Swiper React props
:::
-## Events
+## Events {/* #events */}
Since the `Swiper` component is not provided by Ionic Framework, event names will not have an `onIonSlide` prefix to them.
@@ -430,7 +430,7 @@ All events available in Swiper can be found in the [Swiper API events documentat
:::
-## Methods
+## Methods {/* #methods */}
Most methods have been removed in favor of accessing the `Swiper` props directly.
@@ -473,7 +473,7 @@ Below is a full list of method changes when going from `IonSlides` to Swiper Rea
| `startAutoplay()` | Use the `autoplay` property instead. |
| `stopAutoplay()` | Use the `autoplay` property instead. |
-## Effects
+## Effects {/* #effects */}
If you are using effects such as Cube or Fade, you can install them just like we did with the other modules. In this example, we will use the fade effect. To start, we will import `EffectFade` from `swiper` and provide it in the `modules` array:
@@ -564,21 +564,21 @@ For more information on effects in Swiper, please refer to the [Swiper React eff
:::
-## Wrap Up
+## Wrap Up {/* #wrap-up */}
Now that you have Swiper installed, there is a whole set of new Swiper features for you to enjoy. We recommend starting with the [Swiper React Introduction](https://swiperjs.com/react) and then referencing [the Swiper API docs](https://swiperjs.com/swiper-api).
-## FAQ
+## FAQ {/* #faq */}
-### Where can I find an example of this migration?
+### Where can I find an example of this migration? {/* #where-can-i-find-an-example-of-this-migration */}
You can find a sample app with `ion-slides` and the equivalent Swiper usage at https://github.com/ionic-team/slides-migration-samples.
-### Where can I get help with this migration?
+### Where can I get help with this migration? {/* #where-can-i-get-help-with-this-migration */}
If you are running into issues with the migration, please create a post on the [Ionic Forum](https://forum.ionicframework.com/).
-### Where do I file bug reports?
+### Where do I file bug reports? {/* #where-do-i-file-bug-reports */}
Before opening an issue, please consider creating a post on the [Swiper Discussion Board](https://github.com/nolimits4web/swiper/discussions) or the [Ionic Forum](https://forum.ionicframework.com) to check if your issue can be resolved by the community.
diff --git a/docs/react/storage.mdx b/docs/react/storage.mdx
index 81cb1632d5d..69511d121f7 100644
--- a/docs/react/storage.mdx
+++ b/docs/react/storage.mdx
@@ -21,18 +21,18 @@ Some storage options involve third-party plugins or products. In such cases, we
Here are some common use cases and solutions:
-## Local Application Settings and Data
+## Local Application Settings and Data {/* #local-application-settings-and-data */}
Many applications need to locally store settings as well as other lightweight key/value data. The [Capacitor Preferences](https://capacitorjs.com/docs/apis/preferences) plugin is specifically designed to handle these scenarios.
-## Relational Data Storage (Mobile Only)
+## Relational Data Storage (Mobile Only) {/* #relational-data-storage-mobile-only */}
Some applications, especially those following an offline-first methodology, may require locally storing high volumes of complex relational data. For such scenarios, a SQLite plugin may be used. The most common SQLite plugin offerings are:
- [Cordova SQLite Storage](https://github.com/storesafe/cordova-sqlite-storage) (a [convenience wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/sqlite) also exists for this plugin to aid in implementation)
- [Capacitor Community SQLite Plugin](https://github.com/capacitor-community/sqlite)
-## Non-Relational High Volume Data Storage (Mobile and Web)
+## Non-Relational High Volume Data Storage (Mobile and Web) {/* #non-relational-high-volume-data-storage-mobile-and-web */}
For applications that need to store a high volume of data as well as operate on both web and mobile, a potential solution is to create a key/value pair data storage service that uses [indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) on the web and one of the previously mentioned SQLite plugins on mobile.
@@ -42,7 +42,7 @@ Here a sample of how this can be accomplished:
- [Mobile Service](https://github.com/ionic-enterprise/tutorials-and-demos-react/blob/main/demos/sqlcipher-kv-pair/src/utils/mobile-kv-store.ts)
- [Web Service](https://github.com/ionic-enterprise/tutorials-and-demos-react/blob/main/demos/sqlcipher-kv-pair/src/utils/web-kv-store.ts)
-## Other Options
+## Other Options {/* #other-options */}
Other storage options that provide local as well as cloud-based storage that work well within Capacitor applications also exist and may integrate well with your application.
diff --git a/docs/react/testing/introduction.mdx b/docs/react/testing/introduction.mdx
index 44d6fe6a74a..25698b29563 100644
--- a/docs/react/testing/introduction.mdx
+++ b/docs/react/testing/introduction.mdx
@@ -8,11 +8,11 @@ description: Learn how to test an Ionic React application. This document provide
This document provides an overview of how to test an application built with `@ionic/react`. It covers the basics of testing with React, as well as the specific tools and libraries developers can use to test their applications.
-## Introduction
+## Introduction {/* #introduction */}
Testing is an important part of the development process, and it helps to ensure that an application is working as intended. In `@ionic/react`, testing is done using a combination of tools and libraries, including Jest or Vitest, React Testing Library, Playwright or Cypress.
-## Types of Tests
+## Types of Tests {/* #types-of-tests */}
There are two types of tests that can be written:
diff --git a/docs/react/testing/unit-testing/best-practices.mdx b/docs/react/testing/unit-testing/best-practices.mdx
index 6af22f45d4f..1a705eb4db0 100644
--- a/docs/react/testing/unit-testing/best-practices.mdx
+++ b/docs/react/testing/unit-testing/best-practices.mdx
@@ -4,7 +4,7 @@ sidebar_label: Best Practices
# Best Practices
-## IonApp is required for test templates
+## IonApp is required for test templates {/* #ionapp-is-required-for-test-templates */}
In your test template when rendering with React Testing Library, you must wrap your component with an `IonApp` component. This is required for the component to be rendered correctly.
@@ -24,7 +24,7 @@ test('example', () => {
});
```
-## Use `user-event` for user interactions
+## Use `user-event` for user interactions {/* #use-user-event-for-user-interactions */}
React Testing Library recommends using the `user-event` library for simulating user interactions. This library provides a more realistic simulation of user interactions than the `fireEvent` function provided by React Testing Library.
@@ -50,7 +50,7 @@ test('example', async () => {
For more information on `user-event`, refer to the [user-event documentation](https://testing-library.com/docs/user-event/intro/).
-## Waiting for Components
+## Waiting for Components {/* #waiting-for-components */}
When you need to wait for an Ionic component to render before asserting against its DOM, use the `componentOnReady` helper exported from `@ionic/core`. Do not call `el.componentOnReady()` directly. `@ionic/react` uses Stencil's custom elements build, where that method does not exist on the element. The helper waits one animation frame instead, giving the component's inner contents a chance to render.
diff --git a/docs/react/testing/unit-testing/examples.mdx b/docs/react/testing/unit-testing/examples.mdx
index 39275eef669..1b5a84ac109 100644
--- a/docs/react/testing/unit-testing/examples.mdx
+++ b/docs/react/testing/unit-testing/examples.mdx
@@ -6,11 +6,11 @@ description: Learn how to test an Ionic React application. This document provide
# Examples
-## Testing a modal presented from a trigger
+## Testing a modal presented from a trigger {/* #testing-a-modal-presented-from-a-trigger */}
This example shows how to test a modal that is presented from a trigger. The modal is presented when the user clicks a button.
-### Example component
+### Example component {/* #example-component */}
```tsx title="src/Example.tsx"
import { IonButton, IonModal } from '@ionic/react';
@@ -25,7 +25,7 @@ export default function Example() {
}
```
-### Testing the modal
+### Testing the modal {/* #testing-the-modal */}
```tsx title="src/Example.test.tsx"
import { IonApp } from '@ionic/react';
@@ -49,11 +49,11 @@ test('button presents a modal when clicked', async () => {
});
```
-## Testing a modal presented from useIonModal
+## Testing a modal presented from useIonModal {/* #testing-a-modal-presented-from-useionmodal */}
This example shows how to test a modal that is presented using the `useIonModal` hook. The modal is presented when the user clicks a button.
-### Example component
+### Example component {/* #example-component-1 */}
```tsx title="src/Example.tsx"
import { IonContent, useIonModal, IonHeader, IonToolbar, IonTitle, IonButton, IonPage } from '@ionic/react';
@@ -87,7 +87,7 @@ const Example: React.FC = () => {
export default Example;
```
-### Testing the modal
+### Testing the modal {/* #testing-the-modal-1 */}
```tsx title="src/Example.test.tsx"
import { IonApp } from '@ionic/react';
diff --git a/docs/react/testing/unit-testing/setup.mdx b/docs/react/testing/unit-testing/setup.mdx
index 0e4cf3d1ed1..aae81f5703c 100644
--- a/docs/react/testing/unit-testing/setup.mdx
+++ b/docs/react/testing/unit-testing/setup.mdx
@@ -8,7 +8,7 @@ description: Learn how to set up unit tests for an Ionic React application.
Ionic requires a few additional steps to set up unit tests. If you are using an Ionic starter project, these steps have already been completed for you.
-### Install React Testing Library
+### Install React Testing Library {/* #install-react-testing-library */}
React Testing Library is a set of utilities that make it easier to test React components. It's used to interact with components and test their behavior.
@@ -16,7 +16,7 @@ React Testing Library is a set of utilities that make it easier to test React co
npm install --save-dev @testing-library/react @testing-library/jest-dom @testing-library/user-event
```
-### Initialize Ionic React
+### Initialize Ionic React {/* #initialize-ionic-react */}
Ionic React requires the `setupIonicReact` function to be called before any tests are run. Failing to do so will result in mode-based classes and platform behaviors not being applied to your components.
diff --git a/docs/react/utility-functions.mdx b/docs/react/utility-functions.mdx
index 905c470606d..15e70374138 100644
--- a/docs/react/utility-functions.mdx
+++ b/docs/react/utility-functions.mdx
@@ -13,17 +13,17 @@ sidebar_label: Utility Functions
Ionic React provides utility functions for common tasks like programmatic navigation and controlling page transitions.
-## Router
+## Router {/* #router */}
-### Functions
+### Functions {/* #functions */}
-#### useIonRouter
+#### useIonRouter {/* #useionrouter */}
▸ **useIonRouter**(): [`UseIonRouterResult`](#useionrouterresult)
Returns the Ionic router instance, which provides methods for programmatic navigation with control over page transitions. Use this hook instead of React Router's `useNavigate` when you need to customize the transition animation or use Ionic-aware back navigation.
-##### Customizing Page Transitions
+##### Customizing Page Transitions {/* #customizing-page-transitions */}
```tsx
import { useIonRouter } from '@ionic/react';
@@ -44,7 +44,7 @@ const MyComponent: React.FC = () => {
};
```
-##### Back Navigation
+##### Back Navigation {/* #back-navigation */}
The `goBack()` method navigates within the current Ionic navigation stack, unlike React Router's `navigate(-1)` which follows the browser's linear history.
@@ -64,7 +64,7 @@ const MyComponent: React.FC = () => {
};
```
-##### canGoBack
+##### canGoBack {/* #cangoback */}
Use `canGoBack()` to check whether there are additional routes in the Ionic router's history. This is useful when deciding whether to show a back button or handle the hardware back button on Android.
@@ -81,7 +81,7 @@ const MyComponent: React.FC = () => {
};
```
-##### navigateRoot
+##### navigateRoot {/* #navigateroot */}
Use `navigateRoot()` to navigate to a new root pathname, clearing the navigation history and unmounting all previous views. After navigation, `canGoBack()` will return `false`. This is useful for navigating to a new root after login or logout.
@@ -101,9 +101,9 @@ const MyComponent: React.FC = () => {
Review the [React Navigation Documentation](./navigation.mdx) for more navigation examples.
-### Interfaces
+### Interfaces {/* #interfaces */}
-#### UseIonRouterResult
+#### UseIonRouterResult {/* #useionrouterresult */}
```typescript
import { AnimationBuilder, RouterDirection, RouteAction, RouterOptions, RouteInfo } from '@ionic/react';
diff --git a/docs/react/virtual-scroll.mdx b/docs/react/virtual-scroll.mdx
index 355d58a06a6..c9816a72a68 100644
--- a/docs/react/virtual-scroll.mdx
+++ b/docs/react/virtual-scroll.mdx
@@ -8,7 +8,7 @@
One virtual scrolling solution to consider for your Ionic React app is [Virtuoso](https://virtuoso.dev/). This guide will go over how to install `Virtuoso` into your Ionic React application and use it with other Ionic components.
-## Installation
+## Installation {/* #installation */}
To setup the virtual scroller, first install `react-virtuoso`:
@@ -16,7 +16,7 @@ To setup the virtual scroller, first install `react-virtuoso`:
npm install react-virtuoso
```
-## Usage
+## Usage {/* #usage */}
There are a few components that Virtuoso includes, but this example will use the `Virtuoso` component. This component should be added inside of your `IonContent` component:
@@ -57,7 +57,7 @@ From there, we can use the `itemContent` property to pass a function that will b
An important thing to note here is the `div` that wraps our `IonItem` component. When lazy loading Ionic components, there may be a few frames where the component is loaded but the styles have not loaded in. When this happens, the component's dimension will be `0`, and Virtuoso may throw an error. This is because Virtuoso needs distinct positions for each item it renders, and it cannot determine that when a component's dimension is `0`.
-## Usage with Ionic Components
+## Usage with Ionic Components {/* #usage-with-ionic-components */}
Ionic Framework requires that features such as collapsible large titles, `ion-infinite-scroll`, `ion-refresher`, and `ion-reorder-group` be used within an `ion-content`. To use these experiences with virtual scrolling, you must add the `.ion-content-scroll-host` class to the virtual scroll viewport.
@@ -71,6 +71,6 @@ For example:
```
-## Further Reading
+## Further Reading {/* #further-reading */}
This guide only covers a small portion of what `Virtuoso` is capable of. For more details, please refer to the [Virtuoso documentation](https://virtuoso.dev/).
diff --git a/docs/react/your-first-app.mdx b/docs/react/your-first-app.mdx
index cd95427ae0e..fa052a476d2 100644
--- a/docs/react/your-first-app.mdx
+++ b/docs/react/your-first-app.mdx
@@ -24,7 +24,7 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-## What We'll Build
+## What We'll Build {/* #what-well-build */}
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
@@ -36,7 +36,7 @@ Highlights include:
Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-react) referenced in this guide on GitHub.
-## Download Required Tools
+## Download Required Tools {/* #download-required-tools */}
Download and install these right away to ensure an optimal Ionic development experience:
@@ -46,7 +46,7 @@ Download and install these right away to ensure an optimal Ionic development exp
- **Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode.
- **Mac/Linux** users: virtually any terminal will work.
-## Install Ionic Tooling
+## Install Ionic Tooling {/* #install-ionic-tooling */}
Run the following in the command line terminal to install the Ionic CLI (`ionic`), `native-run`, used to run native binaries on devices and simulators/emulators, and `cordova-res`, used to generate native app icons and splash screens:
@@ -68,7 +68,7 @@ Consider setting up npm to operate globally without elevated permissions. Refer
:::
-## Create an App
+## Create an App {/* #create-an-app */}
Next, create an Ionic React app that uses the "Tabs" starter template and adds Capacitor for native functionality:
@@ -90,7 +90,7 @@ Next we'll need to install the necessary Capacitor plugins to make the app's nat
npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem
```
-### PWA Elements
+### 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).
@@ -123,7 +123,7 @@ root.render(
That’s it! Now for the fun part - let’s run the app.
-## Run the App
+## Run the App {/* #run-the-app */}
Run this command next:
@@ -133,7 +133,7 @@ ionic serve
And voilà! Your Ionic app is now running in a web browser. Most of your app can be built and tested right in the browser, greatly increasing development and testing speed.
-## Photo Gallery
+## Photo Gallery {/* #photo-gallery */}
There are three tabs. Click on the "Tab2" tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
diff --git a/docs/react/your-first-app/2-taking-photos.mdx b/docs/react/your-first-app/2-taking-photos.mdx
index 198614407d2..b65238b780b 100644
--- a/docs/react/your-first-app/2-taking-photos.mdx
+++ b/docs/react/your-first-app/2-taking-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Taking Photos
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 Gallery Hook
+## Photo Gallery Hook {/* #photo-gallery-hook */}
We will create a [custom React hook](https://react.dev/learn/reusing-logic-with-custom-hooks#extracting-your-own-custom-hook-from-a-component) to manage the photos for the gallery.
@@ -91,7 +91,7 @@ _(Your selfie is probably much better than mine)_
After taking a photo, it disappears right away. We need to display it within our app and save it for future access.
-## Displaying Photos
+## Displaying Photos {/* #displaying-photos */}
To define the data structure for our photo metadata, create a new interface named `UserPhoto`. Add this interface at the very bottom of the `usePhotoGallery.ts` file, immediately after the `usePhotoGallery()` method definition.
diff --git a/docs/react/your-first-app/3-saving-photos.mdx b/docs/react/your-first-app/3-saving-photos.mdx
index 258477749e0..0a880554877 100644
--- a/docs/react/your-first-app/3-saving-photos.mdx
+++ b/docs/react/your-first-app/3-saving-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Saving Photos
We’re now able to take multiple photos and display them in a photo gallery on the second tab of our app. These photos, however, are not currently being stored permanently, so when the app is closed, they will be deleted.
-## Filesystem API
+## Filesystem API {/* #filesystem-api */}
Fortunately, saving them to the filesystem only takes a few steps. Begin by creating a new class method, `savePicture()`, in the `usePhotoGallery()` method in `usePhotoGallery.ts`.
diff --git a/docs/react/your-first-app/4-loading-photos.mdx b/docs/react/your-first-app/4-loading-photos.mdx
index 579bbe051ef..6bd1465a38d 100644
--- a/docs/react/your-first-app/4-loading-photos.mdx
+++ b/docs/react/your-first-app/4-loading-photos.mdx
@@ -15,7 +15,7 @@ We’ve implemented photo taking and saving to the filesystem. There’s one las
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 {/* #preferences-api */}
Open `usePhotoGallery.ts` and begin by defining a constant variable that will act as the key for the store.
diff --git a/docs/react/your-first-app/5-adding-mobile.mdx b/docs/react/your-first-app/5-adding-mobile.mdx
index 302988e4e38..c0e285d68f6 100644
--- a/docs/react/your-first-app/5-adding-mobile.mdx
+++ b/docs/react/your-first-app/5-adding-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Adding Mobile
Our photo gallery app won’t be complete until it runs on iOS, Android, and the web - all using one codebase. All it takes is some small logic changes to support mobile platforms, installing some native tooling, then running the app on a device. Let’s go!
-## Import Platform API
+## Import Platform API {/* #import-platform-api */}
Let’s start with making some small code changes - then our app will “just work” when we deploy it to a device.
@@ -33,7 +33,7 @@ import { Capacitor } from '@capacitor/core';
// ...existing code...
```
-## Platform-specific Logic
+## Platform-specific Logic {/* #platform-specific-logic */}
First, we’ll update the photo saving functionality to support mobile. In the `savePicture()` method, check which platform the app is running on. If it’s “hybrid” (Capacitor, the native runtime), then read the photo file into base64 format using the `Filesystem.readFile()` method. Otherwise, use the same logic as before when running the app on the web.
diff --git a/docs/react/your-first-app/6-deploying-mobile.mdx b/docs/react/your-first-app/6-deploying-mobile.mdx
index 64b4888315f..ba2d1181c0b 100644
--- a/docs/react/your-first-app/6-deploying-mobile.mdx
+++ b/docs/react/your-first-app/6-deploying-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Deploying Mobile
Since we added Capacitor to our project when it was first created, there’s only a handful of steps remaining until the Photo Gallery app is on our device!
-## Capacitor Setup
+## Capacitor Setup {/* #capacitor-setup */}
Capacitor is Ionic’s official app runtime that makes it easy to deploy web apps to native platforms like iOS, Android, and more. If you’ve used Cordova in the past, consider reading more about the [differences between Capacitor and Cordova](https://capacitorjs.com/docs/cordova#differences-between-capacitor-and-cordova).
@@ -44,7 +44,7 @@ Note: After making updates to the native portion of the code (such as adding a n
ionic cap sync
```
-## iOS Deployment
+## iOS Deployment {/* #ios-deployment */}
:::important
@@ -82,7 +82,7 @@ Upon tapping the Camera button on the Photo Gallery tab, the permission prompt w

-## Android Deployment
+## Android Deployment {/* #android-deployment */}
Capacitor Android apps are configured and managed through Android Studio. Before running this app on an Android device, there's a couple of steps to complete.
diff --git a/docs/react/your-first-app/7-live-reload.mdx b/docs/react/your-first-app/7-live-reload.mdx
index 25665f016d4..f93cf02adb3 100644
--- a/docs/react/your-first-app/7-live-reload.mdx
+++ b/docs/react/your-first-app/7-live-reload.mdx
@@ -15,7 +15,7 @@ So far, we’ve learned how easy it is to develop a cross-platform app that work
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
+## Live Reload {/* #live-reload */}
Remember `ionic serve`? That was Live Reload working in the browser, allowing us to iterate quickly.
@@ -31,7 +31,7 @@ ionic cap run android -l --external
The Live Reload server will start up, and the native IDE of choice will open if not opened already. Within the IDE, click the Play button to launch the app onto your device.
-## Deleting Photos
+## Deleting Photos {/* #deleting-photos */}
With Live Reload running and the app open on your device, let’s implement photo deletion functionality.
diff --git a/docs/react/your-first-app/8-distribute.mdx b/docs/react/your-first-app/8-distribute.mdx
index e1c6a8ac23d..157c9764b50 100644
--- a/docs/react/your-first-app/8-distribute.mdx
+++ b/docs/react/your-first-app/8-distribute.mdx
@@ -15,13 +15,13 @@ Now that you have built your first app, you are going to want to get it distribu
Below we will run through an overview of the steps.
-## Connect Your Repo
+## Connect Your Repo {/* #connect-your-repo */}
Appflow works directly with Git version control and uses your existing code base as the source of truth for Deploy and Package builds. You will first need to integrate with your hosting service, such as GitHub or Bitbucket, or you can push your code directly to Appflow. Once this is completed, Appflow will have access to your code.
For more on connecting your code repository to Appflow, checkout the [Connect your Repo](https://ionic.io/docs/appflow/quickstart/connect) section inside the Appflow docs.
-## Install the Appflow SDK
+## Install the Appflow SDK {/* #install-the-appflow-sdk */}
The Appflow SDK (also known as Ionic Deploy plugin) will allow you to take advantage of arguably two of the best Appflow features: deploying live updates to your app and bypassing the app stores. Ionic Appflow's Live Update feature is shipped with Appflow SDK and features the capabilities of detecting and syncing the updates for your app that you have pushed to your identified channels within the dashboard.
@@ -36,7 +36,7 @@ ionic deploy add \
For prerequisite and additional instructions on installing the Appflow SDK, visit the [Install the Appflow SDK](https://ionic.io/docs/appflow/quickstart/installation) section inside the Appflow docs.
-## Push a Commit
+## Push a Commit {/* #push-a-commit */}
In order for Appflow to access the latest and greatest changes to your code, you will need to push a commit via the version control integration of your choosing. For those that use GitHub or Bitbucket, this would look as follows:
@@ -48,7 +48,7 @@ git push origin main # push the changes from the main branch to your git host
After the push is made, your commit appears under the `Commits` tab of the Appflow Dashboard. For more information, refer to the [Push a Commit](https://ionic.io/docs/appflow/quickstart/push) section inside the Appflow docs.
-## Deploy a Live Update
+## Deploy a Live Update {/* #deploy-a-live-update */}
With the Appflow SDK installed and your commit pushed up to the Dashboard, you are ready to deploy a live update to a device. The Live Update feature uses the installed Appflow SDK with your native application to listen to a particular Deploy Channel Destination. When a live update is assigned to a Channel Destination, that update will be deployed to user devices running binaries that are configured to listen to that specific Channel Destination.
@@ -66,7 +66,7 @@ Assuming the app is configured correctly to listen to the channel you deployed t
To dive into more details on the steps to deploy a live update, as well as additional information such as disabling deploy for development, check out the [Deploy a Live Update](https://ionic.io/docs/appflow/quickstart/deploy) section inside the Appflow docs.
-## Build a Native Binary
+## Build a Native Binary {/* #build-a-native-binary */}
Next up is a native binary for your app build and deploy process. This is done via the [Ionic Package](https://ionic.io/docs/appflow/package/intro) service. First things first, you will need to create a [Package build](https://ionic.io/docs/appflow/package/builds). This can be done by clicking the `Start build` icon from the `Commits` tab or by clicking the `New build` button in the top right from the `Build > Builds` tab. Then you will select the proper commit for your build and fill in all of the several required fields and any optional fields that you want to specify. After filling in all of the information and the build begins, you can check out it's progress and review the logs if you encounter any errors.
@@ -74,19 +74,19 @@ Given a successful Package build, an iOS binary (`.ipa` or IPA) or/and an Androi
Further information regarding building native binaries can be found inside of the [Build a Native Binary](https://ionic.io/docs/appflow/quickstart/package) section inside the Appflow docs.
-## Create an Automation
+## Create an Automation {/* #create-an-automation */}
[Automations](https://ionic.io/docs/appflow/automation/intro) enable you and your team to utilize the full CI/CD powers of Appflow. You can create automations that trigger [Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) every time your team commits new code to a given branch. The automations can also be configured to use different environments and native configurations for building different versions of your app for development, staging, QA and production.
For more information, visit the [Create an Automation](https://ionic.io/docs/appflow/quickstart/automation) section within the Appflow docs. That section covers creating a single automation. However, you can create multiple automations for different branches or workflows and customize them to fit your needs. An important note is that the ability to create an automation is available for those on our [Basic plans](https://ionic.io/pricing) and above.
-## Create an Environment
+## Create an Environment {/* #create-an-environment */}
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be further customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
Creating an Environment is available for those on our [Basic plans](https://ionic.io/pricing) and above. More information on this can be found in the [Create an Environment](https://ionic.io/docs/appflow/quickstart/environment) section within the Appflow docs.
-## Create a Native Configuration
+## Create a Native Configuration {/* #create-a-native-configuration */}
[Native Configurations](https://ionic.io/docs/appflow/package/native-configs) allow you to easily modify common configuration values that can change between different environments (development, production, staging, etc.) so you do not need to use extra logic or manually commit them to version control. Native configurations can be attached to any [Package build](https://ionic.io/docs/appflow/package/intro) or [Automation](https://ionic.io/docs/appflow/automation/intro).
@@ -98,7 +98,7 @@ Native configs can be used to:
For access to the ability to create a Native Configuration, you will need to be on our [Basic plans](https://ionic.io/pricing) and above. Additional details of this feature can be found in the [Create a Native Configuration](https://ionic.io/docs/appflow/quickstart/native-config) section within the Appflow docs.
-## What’s Next?
+## What’s Next? {/* #whats-next */}
Congratulations! You developed a complete cross-platform Photo Gallery app that runs on the web, iOS, and Android. Not only that, you have also then built the app and deployed it to your users' devices!
diff --git a/docs/reference/browser-support.mdx b/docs/reference/browser-support.mdx
index 0776df2a8f6..5f0c5d38db2 100644
--- a/docs/reference/browser-support.mdx
+++ b/docs/reference/browser-support.mdx
@@ -12,7 +12,7 @@ title: Browser Support
Ionic's earliest goal was to make it easy to develop mobile apps using web technologies like HTML, CSS, and JavaScript. Because of this foundation in web technologies, Ionic can run anywhere the web runs — iOS, Android, browsers, PWAs, and more.
-## Mobile Platforms
+## Mobile Platforms {/* #mobile-platforms */}
In pursuit of [adaptive styling](../core-concepts/fundamentals.mdx#adaptive-styling), Ionic fully supports and is well tested on the mobile platforms listed below:
@@ -31,13 +31,13 @@ Check the [latest Android stats](https://developer.android.com/about/dashboards/
:::
-### A Note on Android Support
+### A Note on Android Support {/* #a-note-on-android-support */}
Starting with Android 5.0, the webview was moved to a separate application that can be updated independently of Android. This means that most Android 5.0+ devices are going to be running a modern version of Chromium. However, there are a still a subset of Android devices that are unable to have their webview updated. These webviews are typically stuck at the version that was available when the device initially shipped.
To figure out what version of the webview a device is running, log `window.navigator.userAgent` to the console when inspecting the application using Chrome Dev Tools.
-## Browsers
+## Browsers {/* #browsers */}
Ionic supports the following browsers:
diff --git a/docs/reference/support.mdx b/docs/reference/support.mdx
index 409485fb547..405c5ebe07d 100644
--- a/docs/reference/support.mdx
+++ b/docs/reference/support.mdx
@@ -10,11 +10,11 @@ title: Support Policy
/>
-## Community Maintenance
+## Community Maintenance {/* #community-maintenance */}
The Ionic Framework has been 100% open source (MIT) since the very beginning, and always will be. Developers can ensure Ionic is the right choice for their cross-platform apps through Ionic’s community maintenance strategy. The Ionic team regularly ships new releases, bug fixes, and is very welcoming to community pull requests.
-## Framework Maintenance and Support Status
+## Framework Maintenance and Support Status {/* #framework-maintenance-and-support-status */}
Given the reality of time and resource constraints as well as the desire to keep innovating in the frontend development space, over time it becomes necessary for the Ionic team to shift focus to newer versions of the Framework. However, Ionic will do everything it can to make the transition to newer versions as smooth as possible. The Ionic team recommends updating to the newest version of the Ionic Framework for the latest features, improvements and stability updates.
@@ -35,13 +35,13 @@ The current status of each Ionic Framework version is:
- **Maintenance**: Only critical bug and security fixes. No major feature improvements.
- **Extended Support**: For teams and organizations that require additional long term maintenance support, Ionic has extended support options available.
-## Compatibility Recommendations
+## Compatibility Recommendations {/* #compatibility-recommendations */}
The Ionic team has compiled a set of recommendations for using the Ionic Framework in conjunction with other contextually-relevant software. This is not meant to be a comprehensive list, but covers many common compatibility questions. The Ionic team strongly recommends reviewing your project dependencies once each quarter to keep track of new releases, features and bug fixes.
-### Core Dependencies
+### Core Dependencies {/* #core-dependencies */}
-#### Ionic Angular
+#### Ionic Angular {/* #ionic-angular */}
| Framework | Minimum Angular Version | Maximum Angular Version | TypeScript |
| :-------: | :---------------------: | :---------------------: | :--------: |
@@ -67,7 +67,7 @@ Angular's support policy for iOS is the two most recent major versions. This mea
Note that later versions of Ionic do not support iOS 13; refer to the [mobile support table](./browser-support.mdx#mobile-platforms).
-#### Ionic React
+#### Ionic React {/* #ionic-react */}
| Framework | Required React Version | TypeScript |
| :-------: | :--------------------: | :--------: |
@@ -78,7 +78,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
| v5 | v16.8+ | 3.7+ |
| v4 | v16.8+ | 3.7+ |
-#### Ionic Vue
+#### Ionic Vue {/* #ionic-vue */}
| Framework | Required Vue Version | TypeScript |
| :-------: | :------------------: | :--------: |
@@ -88,7 +88,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
| v6 | v3.0.6+ | 3.9+ |
| v5 | v3.0+ | 3.9+ |
-#### Ionic Vue Router
+#### Ionic Vue Router {/* #ionic-vue-router */}
| Framework | Required Vue Router Version |
| :-------: | :-------------------------: |
@@ -98,7 +98,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
| v6 | v4+ |
| v5 | v4+ |
-### Native Bridges
+### Native Bridges {/* #native-bridges */}
| Framework | Cordova | Capacitor |
| :------------: | :----------------------------------: | :----------------------: |
@@ -115,7 +115,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
- As iOS and Android (and related tools) are updated, you can expect more updates for Cordova and Capacitor, so it is recommended to stay on the latest version(s) of Cordova and Capacitor.
- Starting with Ionic v9, Capacitor 7 is the minimum officially supported version. Earlier versions of Ionic ran on Capacitor 2 and later.
-### Ionic Platform & Products
+### Ionic Platform & Products {/* #ionic-platform--products */}
| Framework | Appflow | Ionic Native Premier Plugins\* |
| :----------: | :-------------------: | :-----------------------------------------------: |
@@ -129,7 +129,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
- For Capacitor projects, follow the [Capacitor installation guide for Cordova plugins](https://capacitorjs.com/docs/cordova/using-cordova-plugins)
- If you need to use an Enterprise plugin with an Ionic 3 project, please [contact us](https://ionic.zendesk.com/hc)
-### Ionic Platform & Products (Cont.)
+### Ionic Platform & Products (Cont.) {/* #ionic-platform--products-cont */}
| Framework | Ionic Studio | Ionic Native Community Plugins\* |
| :----------: | :---------------------: | :------------------------------: |
diff --git a/docs/reference/versioning.mdx b/docs/reference/versioning.mdx
index 51ee30f7257..0dc26316096 100644
--- a/docs/reference/versioning.mdx
+++ b/docs/reference/versioning.mdx
@@ -2,21 +2,21 @@
Ionic Framework follows the [Semantic Versioning (SemVer)](https://semver.org/) convention: major.minor.patch. Incompatible API changes increment the major version, adding backwards-compatible functionality increments the minor version, and backwards-compatible bug fixes increment the patch version.
-## Release Schedule
+## Release Schedule {/* #release-schedule */}
-### Major Release
+### Major Release {/* #major-release */}
A major release will be published when there is a breaking change introduced in the API. Major releases will occur roughly every **6 months** and may contain breaking changes. Several release candidates will be published prior to a major release in order to get feedback before the final release. An outline of what is changing and why will be included with the release candidates.
-### Minor Release
+### Minor Release {/* #minor-release */}
A minor release will be published when a new feature is added or API changes that are non-breaking are introduced. We will heavily test any changes so that we are confident with the release, but with new code comes the potential for new issues. We are scheduled to release a minor version **every 4 weeks**, if any features or API changes were made.
-### Patch Release
+### Patch Release {/* #patch-release */}
A patch release will be published when bug fixes were included, but the API has not changed and no breaking changes were introduced. We are scheduled to release a new patch version **every week**, but there may be times where we need to release sooner or later than scheduled. To ensure patch releases can fix existing code without introducing new issues from the new features, patch releases will always be published prior to a minor release.
-## Changelog
+## Changelog {/* #changelog */}
For a list of all notable changes to Ionic please refer to the [changelog](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md). This contains an ordered
list of all bug fixes and new features under each release.
diff --git a/docs/techniques/security.mdx b/docs/techniques/security.mdx
index 9aebc97ca93..b7d5c801bfb 100644
--- a/docs/techniques/security.mdx
+++ b/docs/techniques/security.mdx
@@ -13,7 +13,7 @@ title: Security
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-## Sanitizing User Input
+## Sanitizing User Input {/* #sanitizing-user-input */}
For components such as `ion-alert` developers can allow for custom or user-provided content. This content can be plain text or HTML and should be considered untrusted. As with any untrusted input, it is important to sanitize it before doing anything else with it. In particular, using things like `innerHTML` without sanitization provides an attack vector for bad actors to input malicious content and potentially launch a [Cross Site Scripting attack (XSS)](https://en.wikipedia.org/wiki/Cross-site_scripting).
@@ -21,7 +21,7 @@ Ionic comes built in with a basic sanitization implementation for the components
For developers who are not using a framework, or for developers whose framework does not provide the sanitization methods they need, we recommend using [sanitize-html](https://www.npmjs.com/package/sanitize-html). This package provides a simple HTML sanitizer that allows the developer to specify the exact tags and attributes that they want to allow in their application.
-### Angular
+### Angular {/* #angular */}
Angular comes built in with the `DomSanitizer` class. This helps prevent XSS issues by ensuring that values are safe to be used in the DOM. By default, Angular will mark any values it deems unsafe. For example, the following link would be marked as unsafe by Angular because it would attempt to execute some JavaScript.
@@ -35,7 +35,7 @@ public myUrl: string = 'javascript:alert("oh no!")';
To learn more about the built-in protections that Angular provides, refer to the [Angular Security Guide](https://angular.io/guide/security).
-### React
+### React {/* #react */}
React DOM escapes values embedded in JSX before rendering them by converting them to strings. For example, the following would be safe as `name` is converted to a string before being rendered:
@@ -53,17 +53,17 @@ const element = Click Me!;
If the developer needs to achieve more comprehensive sanitization, they can use the [sanitize-html](https://www.npmjs.com/package/sanitize-html) package.
-### Vue
+### Vue {/* #vue */}
Vue does not provide any type of sanitizing methods built in. It is recommended that developers use a package such as [sanitize-html](https://www.npmjs.com/package/sanitize-html).
To learn more about the security recommendations for binding to directives such as `v-html`, refer to the [Vue Syntax Guide](https://vuejs.org/v2/guide/syntax.html#Raw-HTML).
-## Enabling Custom HTML Parsing via `innerHTML`
+## Enabling Custom HTML Parsing via `innerHTML` {/* #enabling-custom-html-parsing-via-innerhtml */}
`ion-alert`, `ion-infinite-scroll-content`, `ion-loading`, `ion-refresher-content`, `ion-select-option`, and `ion-toast` can accept custom HTML as strings for certain properties. These strings are added to the DOM using `innerHTML` and must be properly sanitized by the developer. This behavior is disabled by default which means values passed to the affected components will always be interpreted as plaintext. Developers can enable this custom HTML behavior by setting `innerHTMLTemplatesEnabled: true` in the [IonicConfig](../developing/config.mdx#ionicconfig).
-## Ejecting from the built-in sanitizer
+## Ejecting from the built-in sanitizer {/* #ejecting-from-the-built-in-sanitizer */}
For developers who wish to add complex HTML to components such as `ion-toast`, they will need to eject from the sanitizer that is built into Ionic Framework. Developers can either disable the sanitizer across their entire app or bypass it on a case-by-case basis.
@@ -73,11 +73,11 @@ Bypassing sanitization functionality can make your application vulnerable to [XS
:::
-### Disabling the sanitizer via config
+### Disabling the sanitizer via config {/* #disabling-the-sanitizer-via-config */}
Ionic Framework provides an application config option called `sanitizerEnabled` that is set to `true` by default. Set this value to `false` to globally disable Ionic Framework's built in sanitizer. Please note that this does not disable any sanitizing functionality provided by other frameworks such as Angular.
-### Bypassing the sanitizer on a case-by-case basis
+### Bypassing the sanitizer on a case-by-case basis {/* #bypassing-the-sanitizer-on-a-case-by-case-basis */}
Developers can also choose to eject from the sanitizer in certain scenarios. Ionic Framework provides the `IonicSafeString` class that allows developers to do just that.
@@ -91,7 +91,7 @@ Refer to [Enabling Custom HTML Parsing](#enabling-custom-html-parsing-via-innerh
:::
-#### Usage
+#### Usage {/* #usage */}
````mdx-code-block
{
````
-## Content Security Policies (CSP)
+## Content Security Policies (CSP) {/* #content-security-policies-csp */}
A [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) is a security mechanism that helps protect web applications against certain types of attacks, such as cross-site scripting (XSS) and data injection. It is implemented through an HTTP header that instructs the browser on which sources of content, such as scripts, stylesheets, and images, are allowed to be loaded and executed on a web page.
The main purpose of a CSP is to mitigate the risks associated with code injection attacks. By defining a policy, web developers can specify from which domains or sources the browser should allow the loading and execution of various types of content. This effectively limits the potential damage that can be caused by malicious scripts or unauthorized content.
-### Enabling CSPs
+### Enabling CSPs {/* #enabling-csps */}
Developers can assign a CSP to their application by setting a meta tag with the policy details and the expected nonce value on script and style tags.
@@ -203,7 +203,7 @@ Developers can assign a CSP to their application by setting a meta tag with the
/>
```
-### Ionic and CSP
+### Ionic and CSP {/* #ionic-and-csp */}
Ionic Framework provides a function to help developers set the nonce value used when constructing the web component stylesheets. This function should be called before any Ionic components are loaded. This is required to pass the nonce value to the web components so that they can be used in a CSP environment.
@@ -221,7 +221,7 @@ In Angular this can be called in the `main.ts` file, before the application is b
For more information on how to use CSPs with Stencil web components, refer to the [Stencil documentation](https://stenciljs.com/docs/csp-nonce).
-### Angular
+### Angular {/* #angular-1 */}
Starting in Angular 16, Angular provides two options for setting the nonce value.
diff --git a/docs/test/page1.mdx b/docs/test/page1.mdx
deleted file mode 100644
index cd5b72410d0..00000000000
--- a/docs/test/page1.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 1
-
-This is Testing page 1, Get to Testing Page 2 [here](page2.mdx).
diff --git a/docs/test/page2.mdx b/docs/test/page2.mdx
deleted file mode 100644
index 5ebdef8dca0..00000000000
--- a/docs/test/page2.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 2
-
-This is Testing page 2, Get to Testing Page 1 [here](page1.mdx).
diff --git a/docs/theming/advanced.mdx b/docs/theming/advanced.mdx
index 935a77e05b8..26570ed441b 100644
--- a/docs/theming/advanced.mdx
+++ b/docs/theming/advanced.mdx
@@ -15,7 +15,7 @@ import CodeColor from '@components/page/theming/CodeColor';
CSS-based theming enables apps to customize the colors quickly by loading a CSS file or changing a few CSS property values.
-## `theme-color` Meta
+## `theme-color` Meta {/* #theme-color-meta */}
The `theme-color` value for a meta tag indicates a color that browsers can use to customize the display of a page or of the surrounding interface. This kind of meta tag can also accept media queries which allow developers to set the theme color for both light and dark modes.
@@ -52,11 +52,11 @@ Browsers will prefer the `theme-color` meta over `theme` in `manifest.json` if b
For more information, refer to the [MDN theme-color documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color).
-## Global Variables
+## Global Variables {/* #global-variables */}
While the application and stepped variables in the themes section are useful for changing the colors of an application, often times there is a need for variables that are used in multiple components. The following variables are shared across components to change global padding settings and more.
-### Application Variables
+### Application Variables {/* #application-variables */}
| Name | Description |
| --------------------------- | ---------------------------------------------------------------------------------------------------- |
@@ -70,7 +70,7 @@ While the application and stepped variables in the themes section are useful for
| `--ion-padding` | Adjust the padding of the [Padding attributes](../layout/css-utilities.mdx#padding) |
| `--ion-placeholder-opacity` | Adjust the opacity of the placeholders used in the input, textarea, searchbar, and select components |
-### Grid Variables
+### Grid Variables {/* #grid-variables */}
| Name | Description |
| ------------------------------ | ---------------------------------------------- |
@@ -86,9 +86,9 @@ While the application and stepped variables in the themes section are useful for
| `--ion-grid-column-padding-lg` | Padding of the grid columns for lg breakpoints |
| `--ion-grid-column-padding-xl` | Padding of the grid columns for xl breakpoints |
-## Known Limitations with Variables
+## Known Limitations with Variables {/* #known-limitations-with-variables */}
-### The Alpha Problem
+### The Alpha Problem {/* #the-alpha-problem */}
There is not yet full [browser support](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Browser_compatibility) for alpha use of a hex color. The [`rgba()`]() function only accepts a value in `R, G, B, A` (Red, Green, Blue, Alpha) format. The following code shows examples of correct and incorrect values passed to `rgba()`.
@@ -137,7 +137,7 @@ body {
}
```
-### Variables in Media Queries
+### Variables in Media Queries {/* #variables-in-media-queries */}
CSS variables in [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries) are not currently supported, but there are open drafts to add [custom media queries](https://drafts.csswg.org/mediaqueries-5/#custom-mq) and [custom environment variables](https://drafts.csswg.org/css-env-1/) that would solve this problem! However, with the current state of support, the following will **not** work:
@@ -151,7 +151,7 @@ CSS variables in [media queries](https://developer.mozilla.org/en-US/docs/Web/CS
}
```
-### Modifying CSS Color Variables
+### Modifying CSS Color Variables {/* #modifying-css-color-variables */}
While it is possible to easily alter a color in Sass using its built-in functions, it is currently not as easy to modify colors set in CSS Variables. This can be accomplished in CSS by splitting the [RGB](https://developer.mozilla.org/en-US/docs/Glossary/RGB) or [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) channels and modifying each value, but it is complex and has missing functionality.
@@ -186,7 +186,7 @@ This is normally not a problem, but when an application needs to have dynamic th
There are drafts and issues discussing [color modification proposals](https://github.com/w3c/csswg-drafts/issues/3187) that would make this possible.
-## Safe Area Padding
+## Safe Area Padding {/* #safe-area-padding */}
The safe area of a display is the section that is not covered by the device's notch, status bar, or other elements that are part of the device's UI and not the app's. The dimensions of the safe area are different across devices and orientations (portrait or landscape).
diff --git a/docs/theming/basics.mdx b/docs/theming/basics.mdx
index b330a7383ea..9d7b01ffad2 100644
--- a/docs/theming/basics.mdx
+++ b/docs/theming/basics.mdx
@@ -15,7 +15,7 @@ import ColorAccordion from '@components/page/theming/ColorAccordion';
Ionic Framework is built to be a blank slate that can easily be customized and modified to fit a brand, while still following the standards of the different platforms. Theming Ionic apps is now easier than ever. Because the framework is built with CSS, it comes with pre-baked default styles which are extremely easy to change and modify.
-## Colors
+## Colors {/* #colors */}
Ionic has nine default colors that can be used to change the color of many components. Each color is actually a collection of multiple properties, including a `shade` and `tint`, used throughout Ionic.
@@ -23,20 +23,20 @@ When changing a color, it is important to set all of the related properties. Thi
-## Platform Standards
+## Platform Standards {/* #platform-standards */}
Ionic components adapt their look and behavior based on the platform the app is running on. We call this **Adaptive Styling**. This allows developers to build apps that use the same codebase for multiple platforms, while still looking "native" to those particular platforms.
Ionic has two **modes** that are used to customize the look of components based on the **platform**: `ios` and `md`. Each platform has a default mode, but this can easily be configured. For more information on customizing an application based on the platform, refer to [Platform Styles](platform-styles.mdx).
-## CSS Variables
+## CSS Variables {/* #css-variables */}
The Ionic Framework components are themed using [CSS custom properties (variables)](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables). CSS variables add dynamic values to an otherwise static language. This is something that has traditionally required a CSS preprocessor like Sass. The look of an application can easily be changed by changing the value of any of the [CSS Variables](css-variables.mdx) Ionic Framework provides.
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
CSS Shadow Parts were added to make it easier to fully customize Ionic Framework Shadow components. In the past, components that use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) were unable to have elements inside of their shadow tree styled directly. With the addition of Shadow parts, there is no longer a need for CSS variables for every property on an inner element of a Shadow component. For more information on customizing Ionic Framework components using parts, refer to the [CSS Shadow Parts](css-shadow-parts.mdx) guide.
-## Branding
+## Branding {/* #branding */}
Ionic provides application colors that can be used to theme an application to match a brand or color scheme. The default theme uses a light background, but everything from the background color to the text color is fully customizable. For more information on branding, refer to [Themes](themes.mdx).
diff --git a/docs/theming/colors.mdx b/docs/theming/colors.mdx
index b05f9d1c2a3..3c439cddb04 100644
--- a/docs/theming/colors.mdx
+++ b/docs/theming/colors.mdx
@@ -31,13 +31,13 @@ A color can be applied to an Ionic component in order to change the default colo
Dark
```
-## Layered Colors
+## Layered Colors {/* #layered-colors */}
Each color consists of the following properties: a `base`, `contrast`, `shade`, and `tint`. The `base` and `contrast` colors also require a `rgb` property which is the same color, just in [rgb format](https://developer.mozilla.org/en-US/docs/Glossary/RGB). Refer to [The Alpha Problem](advanced.mdx#the-alpha-problem) for an explanation of why the `rgb` property is also needed. Select from the dropdown below to explore each of the default colors Ionic provides and their variations.
-## Modifying Colors
+## Modifying Colors {/* #modifying-colors */}
To change the default values of a color, all of the listed variations for that color should be set. For example, to change the secondary color to #006600, set the following CSS properties:
@@ -62,7 +62,7 @@ Not sure how to get the variation colors from the base color? Try out our [Color
Refer to the [CSS Variables documentation](css-variables.mdx) for more information on CSS variables.
-## Adding Colors
+## Adding Colors {/* #adding-colors */}
Colors can be added for use throughout an application by setting the `color` property on an Ionic component, or by styling with CSS. Read on to learn how to manually add a new color, or use the [New Color Creator](#new-color-creator) below for a quick way to generate the code of a new color to be copy and pasted into an application.
@@ -109,7 +109,7 @@ div {
Refer to the [CSS Variables documentation](css-variables.mdx) for more information on setting and using CSS variables.
-## New Color Creator
+## New Color Creator {/* #new-color-creator */}
Create a new color below by changing the name and value, then copy and paste the code below into your project.
diff --git a/docs/theming/css-shadow-parts.mdx b/docs/theming/css-shadow-parts.mdx
index fb8fc4f959e..c9270ba18e8 100644
--- a/docs/theming/css-shadow-parts.mdx
+++ b/docs/theming/css-shadow-parts.mdx
@@ -12,7 +12,7 @@ title: CSS Shadow Parts
CSS Shadow Parts allow developers to style CSS properties on an element inside of a shadow tree. This is extremely useful in customizing Ionic Framework [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) components.
-## Why Shadow Parts?
+## Why Shadow Parts? {/* #why-shadow-parts */}
Ionic Framework is a distributed set of [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components). Web Components follow the [Shadow DOM specification](https://w3c.github.io/webcomponents/spec/shadow/) in order to encapsulate styles and markup.
@@ -45,11 +45,11 @@ ion-select .select-placeholder {
So how do we solve this? [CSS Shadow Parts](#shadow-parts-explained)!
-## Shadow Parts Explained
+## Shadow Parts Explained {/* #shadow-parts-explained */}
Shadow parts allow developers to style inside a shadow tree, from outside of that shadow tree. In order to do so, the [part must be exposed](#exposing-a-part) and then it can be styled by using [::part](#how-part-works).
-### Exposing a part
+### Exposing a part {/* #exposing-a-part */}
When creating a Shadow DOM component, a part can be added to an element inside of a shadow tree by assigning a `part` attribute on the element. This is added to the component in Ionic Framework and requires no action from an end user.
@@ -67,7 +67,7 @@ The above shows two parts: `placeholder` and `icon`. Refer to the [select docume
With these parts exposed, the element can now be styled directly using [::part](#how-part-works).
-### How ::part works
+### How ::part works {/* #how-part-works */}
The [`::part()`](https://developer.mozilla.org/en-US/docs/Web/CSS/::part) pseudo-element allows developers to select elements inside of a shadow tree that have been exposed via a part attribute.
@@ -105,7 +105,7 @@ There are some known limitations with [vendor prefixed pseudo-elements](#vendor-
:::
-## Ionic Framework Parts
+## Ionic Framework Parts {/* #ionic-framework-parts */}
All exposed parts for an Ionic Framework component can be found under the CSS Shadow Parts heading on its API page. To view all components and their API pages, refer to the [Component documentation](../components.mdx).
@@ -121,13 +121,13 @@ We welcome recommendations for additional parts. Please create a [new GitHub iss
:::
-## Known Limitations
+## Known Limitations {/* #known-limitations */}
-### Browser Support
+### Browser Support {/* #browser-support */}
CSS Shadow Parts are supported in the recent versions of all of the major browsers. However, some of the older versions do not support shadow parts. Verify the [browser support](https://caniuse.com/#feat=mdn-css_selectors_part) meets the requirements before implementing parts in an app. If browser support for older versions is required, we recommend continuing to use [CSS Variables](../theming/css-variables.mdx) for styling.
-### Vendor Prefixed Pseudo-Elements
+### Vendor Prefixed Pseudo-Elements {/* #vendor-prefixed-pseudo-elements */}
Pseudo-elements that are [vendor prefixed](https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix) are not supported at this time. An example of this would be any of the `::-webkit-scrollbar` pseudo-elements:
@@ -140,7 +140,7 @@ my-component::part(scroll)::-webkit-scrollbar {
Refer to [this issue on GitHub](https://github.com/w3c/csswg-drafts/issues/4530) for more information.
-### Structural Pseudo-Classes
+### Structural Pseudo-Classes {/* #structural-pseudo-classes */}
Most pseudo-classes are supported with parts, however, [structural pseudo-classes](https://www.w3.org/TR/selectors-4/#structural-pseudos) are not. An example of structural pseudo-classes that do not work is below.
@@ -156,7 +156,7 @@ my-component::part(container):last-child {
}
```
-### Chaining Parts
+### Chaining Parts {/* #chaining-parts */}
The `::part()` pseudo-element can not match additional `::part()`s.
diff --git a/docs/theming/css-variables.mdx b/docs/theming/css-variables.mdx
index 5de7885d851..96ee7e53828 100644
--- a/docs/theming/css-variables.mdx
+++ b/docs/theming/css-variables.mdx
@@ -12,9 +12,9 @@ title: CSS Variables
Ionic components are built with [CSS Variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) for easy customization of an application. CSS variables allow a value to be stored in one place, then referenced in multiple other places. They also make it possible to change CSS dynamically at runtime (which previously required a CSS preprocessor). CSS variables make it easier than ever to override Ionic components to match a brand or theme.
-## Setting Values
+## Setting Values {/* #setting-values */}
-### Global Variables
+### Global Variables {/* #global-variables */}
CSS variables can be set globally in an application in the `:root` selector. They can also be applied only for a specific mode. Refer to [Ionic Variables](#ionic-variables) for more information on the global variables Ionic provides.
@@ -41,7 +41,7 @@ When using the Ionic CLI to start an Angular, React or Vue project, the `src/the
}
```
-### Component Variables
+### Component Variables {/* #component-variables */}
To set a CSS variable for a specific component, add the variable inside of its selector. Refer to [Ionic Variables](#ionic-variables) for more information on the component-level variables Ionic provides.
@@ -57,7 +57,7 @@ ion-button {
}
```
-### Variables set via JavaScript
+### Variables set via JavaScript {/* #variables-set-via-javascript */}
CSS variables can also be changed via JavaScript using [setProperty()](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/setProperty):
@@ -66,9 +66,9 @@ const el = document.querySelector('.fancy-button');
el.style.setProperty('--background', '#36454f');
```
-## Getting Values
+## Getting Values {/* #getting-values */}
-### Using CSS
+### Using CSS {/* #using-css */}
The [var() CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/var) can be used to get the value of a CSS variable, along with any number of fallback values, if desired. In the below example, the `--background` property will be set to the value of the `--charcoal` variable, if defined, and if not it will use `#36454f`.
@@ -78,7 +78,7 @@ The [var() CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/var) c
}
```
-### Using JavaScript
+### Using JavaScript {/* #using-javascript */}
The value of a CSS variable can be read in JavaScript using [getPropertyValue()](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/getPropertyValue):
@@ -87,12 +87,12 @@ const el = document.querySelector('.fancy-button');
const color = el.style.getPropertyValue('--background');
```
-## Ionic Variables
+## Ionic Variables {/* #ionic-variables */}
-### Component Variables
+### Component Variables {/* #component-variables-1 */}
Ionic provides variables that exist at the component level, such as `--background` and `--color`. For a list of the custom properties a component accepts, view the `CSS Custom Properties` section of its [API reference](../api.mdx). For example, refer to the [Button CSS Custom Properties](../api/button.mdx#css-custom-properties).
-### Global Variables
+### Global Variables {/* #global-variables-1 */}
There are several global variables that Ionic provides in order to make theming an entire application easier. For more information, refer to [Colors](colors.mdx), [Themes](themes.mdx) and [Advanced Theming](advanced.mdx).
diff --git a/docs/theming/dark-mode.mdx b/docs/theming/dark-mode.mdx
index 035a98f8cd9..50c31c147af 100644
--- a/docs/theming/dark-mode.mdx
+++ b/docs/theming/dark-mode.mdx
@@ -15,11 +15,11 @@ import TabItem from '@theme/TabItem';
Ionic makes it easy to change the palettes of your app, including supporting dark color schemes. Dark mode is a display setting that changes all of an app's views to a dark palette. It has system-wide support on iOS and Android, making it highly desirable for developers to add to their apps.
-## Enabling Dark Palette
+## Enabling Dark Palette {/* #enabling-dark-palette */}
There are three provided ways to enable the dark palette in an app: **always**, based on **system** settings, or by using a CSS **class**.
-### Always
+### Always {/* #always */}
The default palette provided with Ionic Framework is a light palette, consisting of a light background and dark text. However, the default palette can be changed to the dark palette by importing the following stylesheet in the appropriate files:
@@ -70,7 +70,7 @@ Avoid targeting the `.ios` or `.md` selectors to override the Ionic dark palette
:::
-### System
+### System {/* #system */}
The system approach to enable dark mode involves checking the system settings for the user's preferred color scheme. This is the default when starting a new Ionic Framework app. Importing the following stylesheet in the appropriate file will automatically retrieve the user's preference from the system settings and apply the dark palette when dark mode is preferred:
@@ -127,7 +127,7 @@ Avoid targeting the `.ios` or `.md` selectors to override the Ionic dark palette
:::
-### CSS Class
+### CSS Class {/* #css-class */}
While the previous approaches are excellent for enabling the dark palette through file imports alone, there are scenarios where you may need more control over its application. In cases where you need to apply the dark palette conditionally, such as through a toggle, or if you want to extend the functionality based on system settings, we provide a dark palette class file. This file applies the dark palette when a specific class is added to an app. Importing the following stylesheet into the appropriate file will provide the necessary styles for using the dark palette with the class:
@@ -184,7 +184,7 @@ The `.ion-palette-dark` class **must** be added to the `html` element in order t
:::
-## Adjusting System UI Components
+## Adjusting System UI Components {/* #adjusting-system-ui-components */}
When developing a dark palette, you may notice that certain system UI components are not adjusting to dark mode properly. To fix this you will need to specify the `color-scheme`. Refer to the [browser compatibility for color-scheme](https://caniuse.com/#feat=mdn-html_elements_meta_name_color-scheme) for details on cross browser support.
@@ -218,7 +218,7 @@ For developers looking to customize the theme color under the status bar in Safa
:::
-## Ionic Dark Palette
+## Ionic Dark Palette {/* #ionic-dark-palette */}
Ionic has a recommended dark palette that can be enabled in three different ways: [always](#always), based on [system](#system) settings, or by using a [CSS class](#css-class). Each of these methods involves importing the dark palette file with the corresponding name.
diff --git a/docs/theming/high-contrast-mode.mdx b/docs/theming/high-contrast-mode.mdx
index 16a27f8647a..05b4ede5c44 100644
--- a/docs/theming/high-contrast-mode.mdx
+++ b/docs/theming/high-contrast-mode.mdx
@@ -15,15 +15,15 @@ import TabItem from '@theme/TabItem';
Ionic offers palettes with increased contrast for users with low vision. These palettes work by amplifying the contrast between foreground content, such as text, and background content, such as UI components. Ionic provides both light and dark variants for achieving high contrast.
-## Overview
+## Overview {/* #overview */}
The default palette in Ionic provides [Ionic colors](./colors.mdx) that meet [Level AA color contrast](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) as defined by Web Content Accessibility Guidelines (WCAG) when used with the appropriate contrast color. The [Ionic colors](./colors.mdx) in the high contrast palette have been updated to meet [Level AAA color contrast](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html) when used with the appropriate contrast color. Notably, improvements have been made to the contrast of UI components, including border, text, and background colors. However, it's important to note that within the high contrast palette, priority is given to text legibility. This means that if adjusting the contrast of a UI component against the page background would significantly compromise the contrast between the component's text and its background, the contrast of the UI component background will remain unchanged.
-## Enabling High Contrast Theme
+## Enabling High Contrast Theme {/* #enabling-high-contrast-theme */}
There are three provided ways to enable the high contrast palette in an app: **always**, based on **system** settings, or by using a CSS **class**.
-### Always
+### Always {/* #always */}
The high contrast palette can be enabled by importing the following stylesheet in the appropriate files. This approach will enable the high contrast palette regardless of the system settings for contrast preference.
@@ -72,7 +72,7 @@ import AlwaysHighContrastMode from '@site/static/usage/v10/theming/always-high-c
-### System
+### System {/* #system */}
The system approach to enabling high contrast mode involves checking the system settings for the user's preferred contrast. This is the default when starting a new Ionic Framework app. Importing the following stylesheets in the appropriate file will automatically retrieve the user's preference from the system settings and apply the high contrast palette when high contrast is preferred.
@@ -136,7 +136,7 @@ high contrast dark palette must be imported after `dark.system.css`. Otherwise,
:::
-### CSS Class
+### CSS Class {/* #css-class */}
While the previous approaches are excellent for enabling the high contrast palette through file imports alone, there are scenarios where you may need more control over where it is applied. In cases where you need to apply the high contrast palette conditionally, such as through a toggle, or if you want to extend the functionality based on system settings, we provide a high contrast palette class file. This file applies the high contrast palette when a specific class is added to an app. Importing the following stylesheets into the appropriate file will provide the necessary styles for using the high contrast palette with the class:
@@ -205,7 +205,7 @@ The `.ion-palette-high-contrast` class **must** be added to the `html` element i
:::
-## Customizing Ionic High Contrast Theme
+## Customizing Ionic High Contrast Theme {/* #customizing-ionic-high-contrast-theme */}
Ionic has a recommended high contrast palette that can be enabled in three different ways: [always](#always), based on [system](#system) settings, or by using a [CSS class](#css-class). Each of these methods involves importing the high contrast palette file with the corresponding name.
diff --git a/docs/theming/platform-styles.mdx b/docs/theming/platform-styles.mdx
index e58a1be4579..c0454506087 100644
--- a/docs/theming/platform-styles.mdx
+++ b/docs/theming/platform-styles.mdx
@@ -12,7 +12,7 @@ title: Platform Styles
Ionic provides platform specific styles based on the device the application is running on. Styling the components to match the device guidelines allows the application to be written once but look and feel native to the user depending on where it is accessed.
-## Ionic Modes
+## Ionic Modes {/* #ionic-modes */}
Ionic uses **modes** to customize the look of components. Each **platform** has a default **mode**, but this can be overridden through the global [config](../developing/config.mdx). The following chart displays the default **mode** that is added to each **platform**:
@@ -30,7 +30,7 @@ For example, an app being viewed on an Android platform will use the `md` (Mater
_Note: The **platform** and the **mode** are not the same. The platform can be set to use any mode in the [config](../developing/config.mdx) of an app._
-## Overriding Mode Styles
+## Overriding Mode Styles {/* #overriding-mode-styles */}
Each Ionic component can be styled based on the mode. The `html` element has both a `class` and `mode` attribute with a value equal to the current mode. These can be used to override styles for any component. For example, to style an `ion-badge` to have `uppercase` text only in `ios` mode:
diff --git a/docs/theming/themes.mdx b/docs/theming/themes.mdx
index 4b68041ec92..2f7d141843a 100644
--- a/docs/theming/themes.mdx
+++ b/docs/theming/themes.mdx
@@ -15,7 +15,7 @@ import SteppedColorGenerator from '@components/page/theming/SteppedColorGenerato
Ionic provides several global variables that are used throughout components to change the default theme of an entire application. [Application Colors](#application-colors) are useful to change the look of most of the Ionic components, and [Stepped Colors](#stepped-colors) are used as variations in some of the Ionic components.
-## Application Colors
+## Application Colors {/* #application-colors */}
The application colors are used in multiple places in Ionic. These are useful for easily creating dark palettes or themes that match a brand.
@@ -50,7 +50,7 @@ It is important to note that the background and text color variables also requir
| `--ion-item-color` | Color of the components in the Item |
| `--ion-placeholder-color` | Color of the placeholder in Inputs |
-## Stepped Colors
+## Stepped Colors {/* #stepped-colors */}
After exploring different ways to customize the Ionic theme, we found that we couldn't use just one background or text color. In order to imply importance and depth throughout the design, we need to use different shades of the background and text colors. To accommodate this pattern, we created stepped colors.
@@ -62,7 +62,7 @@ Ionic provides separate step colors for text and background colors so they can b
By default, the Ionic text stepped colors start at the default text color value #000000 and mix with the background color value #ffffff using an increasing percentage. The Ionic background stepped colors start at the default background color value #ffffff and mix with the text color value #000000 using an increasing percentage. The full list of stepped colors is shown in the generator below.
-## Stepped Color Generator
+## Stepped Color Generator {/* #stepped-color-generator */}
Create a custom background and text color theme for your app. Update the background or text color’s hex values below, then copy and paste the generated code directly into your Ionic project.
diff --git a/docs/troubleshooting/build.mdx b/docs/troubleshooting/build.mdx
index c7eddca3913..434837fac40 100644
--- a/docs/troubleshooting/build.mdx
+++ b/docs/troubleshooting/build.mdx
@@ -10,9 +10,9 @@ title: Build Errors
/>
-## Common mistakes
+## Common mistakes {/* #common-mistakes */}
-### Forgetting Parentheses on a Decorator
+### Forgetting Parentheses on a Decorator {/* #forgetting-parentheses-on-a-decorator */}
Decorators should have parentheses `()` after an annotation. Some examples include: `@Injectable()`, `@Optional()`, `@Input()`, etc.
@@ -27,9 +27,9 @@ class MyDirective {
}
```
-## Common Errors
+## Common Errors {/* #common-errors */}
-### Cannot Resolve all Parameters
+### Cannot Resolve all Parameters {/* #cannot-resolve-all-parameters */}
```shell
Cannot resolve all parameters for 'YourClass'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'YourClass' is decorated with Injectable.
@@ -77,7 +77,7 @@ class MyIcon {
}
```
-### No provider for ParamType
+### No provider for ParamType {/* #no-provider-for-paramtype */}
```shell
No provider for ParamType! (MyClass -> ParamType)
@@ -168,7 +168,7 @@ class MyDir {
}
```
-### Can't bind to 'propertyName' since it isn't a known property
+### Can't bind to 'propertyName' since it isn't a known property {/* #cant-bind-to-propertyname-since-it-isnt-a-known-property */}
```shell
Can't bind to 'propertyName' since it isn't a known property of the 'elementName' element and there are no matching directives with a corresponding property
@@ -181,7 +181,7 @@ This happens when you try and bind a property on an element that doesn't have th
```
-### No provider for ControlContainer
+### No provider for ControlContainer {/* #no-provider-for-controlcontainer */}
```shell
No provider for ControlContainer! (NgControlName -> ControlContainer)
@@ -198,7 +198,7 @@ This error is a more specific version of the `No provider` error above. It happe
})
```
-### No Component Factory Found
+### No Component Factory Found {/* #no-component-factory-found */}
```shell
No component factory found for
diff --git a/docs/troubleshooting/cors.mdx b/docs/troubleshooting/cors.mdx
index 024f06e04f2..60103cab709 100644
--- a/docs/troubleshooting/cors.mdx
+++ b/docs/troubleshooting/cors.mdx
@@ -10,7 +10,7 @@ title: CORS Errors
/>
-## What is CORS?
+## What is CORS? {/* #what-is-cors */}
**Cross-Origin Resource Sharing (CORS)** is a mechanism that browsers and webviews — like the ones powering Capacitor and Cordova — use to restrict HTTP and HTTPS requests made from scripts to resources in a different origin for security reasons, mainly to protect your user's data and prevent attacks that would compromise your app.
@@ -28,9 +28,9 @@ XMLHttpRequest cannot load https://api.example.com. No 'Access-Control-Allow-Ori
:::
-## How does CORS work
+## How does CORS work {/* #how-does-cors-work */}
-### Request with preflight
+### Request with preflight {/* #request-with-preflight */}
By default, when a web app tries to make a cross-origin request the browser sends a **preflight request** before the actual request. This preflight request is needed in order to know if the external resource supports CORS and if the actual request can be sent safely, since it may impact user data.
@@ -86,7 +86,7 @@ If the returned origin and method don't match the ones from the actual request,
In our example, since the API expects JSON, all `POST` requests will have a `Content-Type: application/json` header and always be preflighted.
-### Simple requests
+### Simple requests {/* #simple-requests */}
Some requests are always considered safe to send and don't need a preflight if they meet all of the following conditions:
@@ -112,9 +112,9 @@ Some requests are always considered safe to send and don't need a preflight if t
In our example API, `GET` requests don't need to be preflighted because no JSON data is being sent, and so the app doesn't need to use the `Content-Type: application/json` header. They will always be simple requests.
-## CORS Headers
+## CORS Headers {/* #cors-headers */}
-### Server Headers (Response)
+### Server Headers (Response) {/* #server-headers-response */}
| Header | Value | Description |
| -------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
@@ -125,26 +125,26 @@ In our example API, `GET` requests don't need to be preflighted because no JSON
| Access-Control-Expose-Headers | `headers` | Specifies the headers that the browser is allowed to access. |
| Access-Control-Max-Age | `seconds` | Indicates how long the results of a preflight request can be cached. |
-### Browser Headers (Request)
+### Browser Headers (Request) {/* #browser-headers-request */}
The browser automatically sends the appropriate headers for CORS in every request to the server, including the preflight requests. Please note that the headers below are for reference only, and **should not be set in your app code** (the browser will ignore them).
-#### All Requests
+#### All Requests {/* #all-requests */}
| Header | Value | Description |
| ---------- | -------- | ------------------------------------ |
| **Origin** | `origin` | Indicates the origin of the request. |
-#### Preflight Requests
+#### Preflight Requests {/* #preflight-requests */}
| Header | Value | Description |
| --------------------------------- | --------- | ------------------------------------------------------------------------------------------------- |
| **Access-Control-Request-Method** | `method` | Used to let the server know what method will be used when the actual request is made. |
| Access-Control-Request-Headers | `headers` | Used to let the server know what non-simple headers will be used when the actual request is made. |
-## Solutions for CORS Errors
+## Solutions for CORS Errors {/* #solutions-for-cors-errors */}
-### A. Enabling CORS in a server you control
+### A. Enabling CORS in a server you control {/* #a-enabling-cors-in-a-server-you-control */}
The correct and easiest solution is to enable CORS by returning the [right response headers](#server-headers-response) from the web server or backend and responding to preflight requests, as it allows to keep using `XMLHttpRequest`, `fetch`, or abstractions like `HttpClient` in Angular.
@@ -154,7 +154,7 @@ Please note that all of the `Access-Control-Allow-*` headers have to be sent fro
Here are some of the origins your Ionic app may be served from:
-#### Capacitor
+#### Capacitor {/* #capacitor */}
| Platform | Origin |
| -------- | ----------------------- |
@@ -163,7 +163,7 @@ Here are some of the origins your Ionic app may be served from:
Replace `localhost` with your own hostname if you have changed the default in the Capacitor config.
-#### Ionic WebView 3.x plugin on Cordova
+#### Ionic WebView 3.x plugin on Cordova {/* #ionic-webview-3x-plugin-on-cordova */}
| Platform | Origin |
| -------- | ------------------- |
@@ -172,7 +172,7 @@ Replace `localhost` with your own hostname if you have changed the default in th
Replace `localhost` with your own hostname if you have changed the default in the plugin config.
-#### Ionic WebView 2.x plugin on Cordova
+#### Ionic WebView 2.x plugin on Cordova {/* #ionic-webview-2x-plugin-on-cordova */}
| Platform | Origin |
| -------- | ----------------------- |
@@ -181,7 +181,7 @@ Replace `localhost` with your own hostname if you have changed the default in th
Replace port `8080` with your own if you have changed the default in the plugin config.
-#### Local development in the browser
+#### Local development in the browser {/* #local-development-in-the-browser */}
| Command | Origin |
| ----------------------------- | -------------------------------------------------------- |
@@ -232,19 +232,19 @@ app.listen(3000, () => {
});
```
-### B. Working around CORS in a server you can't control
+### B. Working around CORS in a server you can't control {/* #b-working-around-cors-in-a-server-you-cant-control */}
-#### Don't leak your keys!
+#### Don't leak your keys! {/* #dont-leak-your-keys */}
If you are trying to connect to a 3rd-party API, first check in its documentation that is safe to use it directly from the app (client-side) and that it won't leak any secret/private keys or credentials, as they can be read in clear text in Javascript code. Many APIs don't support CORS on purpose, in order to force developers to use them in the server and protect important information or keys.
-#### 1. Native-only apps (iOS/Android)
+#### 1. Native-only apps (iOS/Android) {/* #1-native-only-apps-iosandroid */}
-##### Capacitor Applications (Recommended)
+##### Capacitor Applications (Recommended) {/* #capacitor-applications-recommended */}
For Capacitor applications, use the [Capacitor HTTP API](https://capacitorjs.com/docs/apis/http). This API patches `fetch` and `XMLHttpRequest` to use native libraries. Please note that if you also deploy the application to a web-based context such as PWA or the local development server (via `ionic serve` for example) you still need to implement CORS for those scenarios.
-##### Legacy Cordova Applications
+##### Legacy Cordova Applications {/* #legacy-cordova-applications */}
For legacy Cordova applications, use the [HTTP plugin with the Awesome Cordova Plugins wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/http). Please note that this plugin doesn't work in the browser, so the development and testing of the app must always be done in a device or simulator going forward.
@@ -280,7 +280,7 @@ export class HomePage {
}
```
-#### 2. Native + PWAs
+#### 2. Native + PWAs {/* #2-native--pwas */}
Send the requests through an HTTP/HTTPS proxy that bypasses them to the external resources and adds the necessary CORS headers to the responses. This proxy must be trusted or under your control, as it will be intercepting most traffic made by the app.
@@ -288,7 +288,7 @@ Also, keep in mind that the browser or webview will not receive the original HTT
Check [cors-anywhere](https://github.com/Rob--W/cors-anywhere/) for a Node.js CORS proxy that can be deployed in your own server. Using free hosted CORS proxies in production is not recommended.
-### C. Disabling CORS or browser web security
+### C. Disabling CORS or browser web security {/* #c-disabling-cors-or-browser-web-security */}
Please be aware that CORS exists for a reason (security of user data and to prevent attacks against your app). **It's not possible or advisable to try to disable CORS**.
@@ -296,7 +296,7 @@ Older webviews like `UIWebView` on iOS don't enforce CORS but are deprecated and
If you are developing a PWA or testing in the browser, using the `--disable-web-security` flag in Google Chrome or an extension to disable CORS is a really bad idea. You will be exposed to all kind of attacks, you can't ask your users to take the risk, and your app won't work once in production.
-##### Sources
+##### Sources {/* #sources */}
- [CORS Errors in Ionic Apps](https://fdezromero.com/cors-errors-in-ionic-apps)
- [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
diff --git a/docs/troubleshooting/debugging.mdx b/docs/troubleshooting/debugging.mdx
index d10f67d5efc..1ffd36330e9 100644
--- a/docs/troubleshooting/debugging.mdx
+++ b/docs/troubleshooting/debugging.mdx
@@ -19,11 +19,11 @@ title: Debugging
allowFullScreen
>
-## Live Reload
+## Live Reload {/* #live-reload */}
Live Reload is useful for debugging native functionality (such as plugins) on device hardware. Rather than deploy a new native binary each time you make a code change, it reloads the browser (or WebView) when changes in the app are detected. Learn more about [Live Reload](../cli/livereload.mdx).
-## iOS and Safari
+## iOS and Safari {/* #ios-and-safari */}
Safari can be used to debug an Ionic app on a connected iOS device or iOS simulator.
@@ -35,7 +35,7 @@ Run the iOS simulator or connect your iOS device to your Mac, then run the Ionic
Within Safari, select **Develop** in the toolbar. The dropdown menu lists the name of your device and app. Hover over the app name and click on **localhost**. This will open a new window with the Safari Developer Tools - use them to inspect and debug the Ionic app running on your device.
-## Android and Chrome
+## Android and Chrome {/* #android-and-chrome */}
Use Google Chrome's DevTools to debug an app when it is running in the browser using the `ionic serve` command, deployed to an emulator, or on a physical device.
@@ -55,7 +55,7 @@ The app preview may not automatically appear when you open Chrome Developer Tool
:::
-## Debugging with Visual Studio locally in Chrome (both Android & iOS)
+## Debugging with Visual Studio locally in Chrome (both Android & iOS) {/* #debugging-with-visual-studio-locally-in-chrome-both-android--ios */}
[Visual Studio Code](https://code.visualstudio.com/) can also be used to debug an Ionic app running in the Chrome web browser.
@@ -67,7 +67,7 @@ Make sure that the port used in the url property of your `launch.json` file matc
In the debug target dropdown menu, select **Launch against Chrome**, then click run. This will open a new instance of the Chrome browser and VS code will attach to it. You can set breakpoints and use the other debugging tools within VS Code while your app is running in Chrome.
-## Debugging with Visual Studio Code in Android
+## Debugging with Visual Studio Code in Android {/* #debugging-with-visual-studio-code-in-android */}
[Visual Studio Code](https://code.visualstudio.com/) has a dedicated plugin for debugging apps that run in an Android WebView.
diff --git a/docs/troubleshooting/native.mdx b/docs/troubleshooting/native.mdx
index cd288459839..073151db8f6 100644
--- a/docs/troubleshooting/native.mdx
+++ b/docs/troubleshooting/native.mdx
@@ -10,7 +10,7 @@ title: Native Errors
/>
-## Code Signing errors
+## Code Signing errors {/* #code-signing-errors */}
```shell
Code Signing Error: Failed to create provisioning profile. The app ID "com.csform.ionic.yellow" cannot be registered to your development team. Change your bundle identifier to a unique string to try again. Code Signing Error: No profiles for 'com.csform.ionic.yellow' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.csform.ionic.yellow'. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
@@ -42,7 +42,7 @@ Running an app on an iOS device requires a provisioning profile. If a provisioni

-## Xcode build error 65
+## Xcode build error 65 {/* #xcode-build-error-65 */}
```shell
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ionitron/projects/my-project/platforms/ios/cordova/build-debug.xcconfig,-workspace,SC project.xcworkspace,-scheme,SC project,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/ionitron/projects/my-project/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/ionitron/projects/my-project/platforms/ios/build/sharedpch
@@ -63,7 +63,7 @@ ionic cordova build ios --prod
Once these commands have been ran a fresh build can be done.
-## Clashing Google Play Services versions
+## Clashing Google Play Services versions {/* #clashing-google-play-services-versions */}
```shell
Error: more than one library with package name com.google.android.gms
diff --git a/docs/troubleshooting/runtime.mdx b/docs/troubleshooting/runtime.mdx
index fbcbe8ea140..130e8612214 100644
--- a/docs/troubleshooting/runtime.mdx
+++ b/docs/troubleshooting/runtime.mdx
@@ -10,7 +10,7 @@ title: Runtime Issues
/>
-## Blank App
+## Blank App {/* #blank-app */}
:::note
@@ -42,7 +42,7 @@ Alternatively, a project could be updated to use the latest release of the `@ang
This will automatically include the polyfills for older browsers that need them.
-## Directive Not Working
+## Directive Not Working {/* #directive-not-working */}
:::note
@@ -85,7 +85,7 @@ class MyDir {
class MyPage { }
```
-## Click Delays
+## Click Delays {/* #click-delays */}
:::note
@@ -107,7 +107,7 @@ add the `tappable` attribute to your element.
I am clickable!
```
-## Angular Change Detection
+## Angular Change Detection {/* #angular-change-detection */}
:::note
@@ -151,7 +151,7 @@ This flag is automatically included when creating an Ionic app via the Ionic CLI
:::
-## Cordova plugins not working in the browser
+## Cordova plugins not working in the browser {/* #cordova-plugins-not-working-in-the-browser */}
At some point in your development you may, try to call Cordova plugin, but get a
warning:
@@ -175,7 +175,7 @@ EXCEPTION: Error: Uncaught (in promise): TypeError: undefined is not an object
If this happens, test the plugin on a real device or simulator.
-## Multiple instances of a provider
+## Multiple instances of a provider {/* #multiple-instances-of-a-provider */}
If you inject a provider in every component because you want it available to all
of them you will end up with multiple instances of the provider. You should
diff --git a/docs/updating/10-0.mdx b/docs/updating/10-0.mdx
index 649b1edaf70..6be8172c88c 100644
--- a/docs/updating/10-0.mdx
+++ b/docs/updating/10-0.mdx
@@ -12,4 +12,4 @@ This guide assumes that you have already updated your app to the latest version
For a **complete list of breaking changes** from Ionic 9 to Ionic 10, please refer to [the breaking changes document](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-10x) in the Ionic Framework repository.
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
diff --git a/docs/updating/4-0.mdx b/docs/updating/4-0.mdx
index 01b422e1e14..261e074c30c 100644
--- a/docs/updating/4-0.mdx
+++ b/docs/updating/4-0.mdx
@@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';
# Updating to Ionic 4
-## Updating from Ionic 3 to 4
+## Updating from Ionic 3 to 4 {/* #updating-from-ionic-3-to-4 */}
:::note
@@ -37,7 +37,7 @@ We suggest the following general process when migrating an existing application
In many cases, using the Ionic CLI to generate a new object and then copying the code also works very well. For example: `ionic g service weather` will create a shell `Weather` service and test. The code can then be copied from the older project with minor modifications as needed. This helps to ensure the proper structure is followed. This also generates shells for unit tests.
-### Changes in Package Name
+### Changes in Package Name {/* #changes-in-package-name */}
In Ionic 4, the package name is `@ionic/angular`. Uninstall Ionic 3 and install Ionic 4 using the new package name:
@@ -48,7 +48,7 @@ $ npm install @ionic/angular@v4-lts
While migrating an app, update the imports from `ionic-angular` to `@ionic/angular`.
-### Project structure
+### Project structure {/* #project-structure */}
One of the major changes between an Ionic 3 app and an Ionic 4 app is the overall project layout and structure. In v3, Ionic apps had a custom convention for how an app should be set up and what that folder structure should look like. In v4, this has been changed to follow the recommended setup of each supported framework.
@@ -140,11 +140,11 @@ See the following `ionic.config.json` as an example:
}
```
-### RxJS Changes
+### RxJS Changes {/* #rxjs-changes */}
Between V3 and V4, RxJS was updated to version 6. This changes many of the import paths of operators and core RxJS functions. Please refer to the [RxJS Migration Guide](https://github.com/ReactiveX/rxjs/blob/6.x/docs_app/content/guide/v6/migration.md) for details.
-### Lifecycle Events
+### Lifecycle Events {/* #lifecycle-events */}
With V4, we're now able to utilize the typical events provided by [Angular](https://angular.io/guide/lifecycle-hooks). But for certain cases, you might want to have access to the events fired when a component has finished animating during its route change. In this case, the `ionViewWillEnter`, `ionViewDidEnter`, `ionViewWillLeave`, and `ionViewDidLeave` have been ported over from V3. Use these events to coordinate actions with Ionic's own animations system.
@@ -152,7 +152,7 @@ Older events like `ionViewDidLoad`, `ionViewCanLeave`, and `ionViewCanEnter` hav
For more details, check out the [router-outlet docs](../api/router-outlet.mdx)
-### Overlay Components
+### Overlay Components {/* #overlay-components */}
In prior versions of Ionic, overlay components such as Loading, Toast, or Alert were created synchronously. In Ionic v4, these components are all created asynchronously. As a result of this, the API is now promise-based.
@@ -190,7 +190,7 @@ async showAlert() {
}
```
-### Navigation
+### Navigation {/* #navigation */}
In V4, navigation received the most changes. Now, instead of using Ionic's own `NavController`, we integrate with the official Angular Router. This not only provides a consistent routing experience across apps, but is much more dependable. The Angular team has an [excellent guide](http://angular.io/guide/router) on their docs site that covers the Router in great detail.
@@ -198,7 +198,7 @@ To provide the platform-specific animations that users are used to, we have crea
For a detailed explanation in navigation works in a V4 project, check out the [Angular navigation guide](../angular/navigation.mdx).
-### Lazy Loading
+### Lazy Loading {/* #lazy-loading */}
Since Navigation has changed, the mechanism for lazy loading has also changed in V4.
@@ -248,15 +248,15 @@ export class AppModule {}
For a detailed explanation of lazy loading in V4 project, check out the [Angular navigation guide](../angular/navigation.mdx#lazy-loading-routes).
-### Markup Changes
+### Markup Changes {/* #markup-changes */}
Since v4 moved to Custom Elements, there's been a significant change to the markup for each component. These changes have all been made to follow the Custom Elements spec, and have been documented in a [dedicated file on GitHub](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#breaking-changes).
To help with these markup changes, we've released a TSLint-based [Migration Tool](https://github.com/ionic-team/v4-migration-tslint), which detects issues and can even fix some of them automatically.
-## Updating from Ionic 1 to 4
+## Updating from Ionic 1 to 4 {/* #updating-from-ionic-1-to-4 */}
-### Ionic 1 to Ionic 4: What’s Involved?
+### Ionic 1 to Ionic 4: What’s Involved? {/* #ionic-1-to-ionic-4-whats-involved */}
Migrating from Ionic 1 to Ionic 4 involves moving from AngularJS (aka Angular 1) to Angular 7+. There are many architectural differences between these versions, so some of the app code will have to be rewritten. The amount of work involved depends on the complexity and size of your app.
@@ -268,7 +268,7 @@ Here are some considerations to review before beginning the upgrade:
- **Framework support**: In 2019, Ionic will release full support for React. You can also use Ionic Framework components [without a framework](../intro/cdn.mdx). Since these are not production-ready yet, we recommend sticking with Angular or waiting until the other framework support is available.
- **Budget and team makeup**: The length of a migration project will vary based on the size of your team, the complexity of the app, and the amount of time allotted to make the transition.
-### Suggested Strategy
+### Suggested Strategy {/* #suggested-strategy */}
Once your development team has identified a good time frame for beginning the migration, Ionic recommends feature-freezing the Ionic 1 application and getting the code in order: Fix any major bugs, eliminate tech debt, and reorganize as you see fit. Then, identify which features to migrate over and which to abandon.
@@ -276,14 +276,14 @@ Once the Ionic 1 app is stable, create a new Ionic 4 project. The majority of th
Once the team is comfortable that the Ionic 4 app has become stable and has fulfilled a core set of features, you can then shut down the Ionic 1 app.
-### Moving From AngularJS to Angular
+### Moving From AngularJS to Angular {/* #moving-from-angularjs-to-angular */}
Please reference official [Angular upgrade guide](https://angular.io/guide/upgrade) information.
-### Ionic Changes
+### Ionic Changes {/* #ionic-changes */}
Our Ionic 3 to Ionic 4 migration sections above may prove to be a useful reference. Generate a new Ionic 4 project using the blank starter (refer to [Starting an App](../developing/starting.mdx)). Spend time getting familiar with Ionic 4 components. Happy building!
-### Need Assistance?
+### Need Assistance? {/* #need-assistance */}
If your team would like assistance with the migration, please [reach out to us](https://ionicframework.com/enterprise-engine)! Ionic offers Advisory Services, which includes Ionic 4 training, architecture reviews, and migration assistance.
diff --git a/docs/updating/5-0.mdx b/docs/updating/5-0.mdx
index a844b2dacf3..4d771961d60 100644
--- a/docs/updating/5-0.mdx
+++ b/docs/updating/5-0.mdx
@@ -18,7 +18,7 @@ For a **complete list of breaking changes** from Ionic 4 to Ionic 5, please refe
:::
-### Packages and Dependencies
+### Packages and Dependencies {/* #packages-and-dependencies */}
For Angular based projects, you can simply run:
diff --git a/docs/updating/6-0.mdx b/docs/updating/6-0.mdx
index ed4e01f9a4e..812c6b1fa96 100644
--- a/docs/updating/6-0.mdx
+++ b/docs/updating/6-0.mdx
@@ -16,9 +16,9 @@ For a **complete list of breaking changes** from Ionic 5 to Ionic 6, please refe
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 6 supports Angular 12+. Update to the latest version of Angular by following the [Angular Update Guide](https://update.angular.io/).
2. Update to the latest version of Ionic 6:
@@ -36,7 +36,7 @@ npm install @ionic/angular@6 @ionic/angular-server@6
3. Remove any usage of `Config.set()`. Instead, set your config in `IonicModule.forRoot()`. Refer to the [Angular Config Documentation](../developing/config) for more examples.
4. Remove any usage of the `setupConfig` function previously exported from `@ionic/angular`. Set your config in `IonicModule.forRoot()` instead.
-### React
+### React {/* #react */}
1. Ionic 6 supports React 17+. Update to the latest version of React:
@@ -107,7 +107,7 @@ import { menuController } from '@ionic/core';
import { menuController } from '@ionic/core/components';
```
-### Vue
+### Vue {/* #vue */}
1. Ionic 6 supports Vue 3.0.6+. Update to the latest version of Vue:
@@ -300,7 +300,7 @@ const routes: Array = [
];
```
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 6:
@@ -308,9 +308,9 @@ const routes: Array = [
npm install @ionic/core@6
```
-## Updating Your Code
+## Updating Your Code {/* #updating-your-code */}
-### Datetime
+### Datetime {/* #datetime */}
1. Remove any usages of the `placeholder`, `pickerOptions`, `pickerFormat`, `monthNames`, `monthShortNames`, `dayNames`, and `dayShortNames` properties. `ion-datetime` now automatically formats the month names, day names, and time displayed inside of the component according to the language and region set on the device. Refer to the [ion-datetime Localization Documentation](../api/datetime#localization) for more information.
@@ -328,15 +328,15 @@ Refer to the [Datetime Migration Sample Application](https://github.com/ionic-te
:::
-### Icon
+### Icon {/* #icon */}
Ionic 6 now ships with Ionicons 6. Review the [Ionicons 6 Breaking Changes Guide](https://github.com/ionic-team/ionicons/releases/tag/v6.0.0) and make any necessary changes.
-### Input
+### Input {/* #input */}
Ensure `null` is not passed in as a value to the `placeholder` property. We recommend using `undefined` instead.
-### Modal
+### Modal {/* #modal */}
`ion-modal` now uses the Shadow DOM. Update any styles targeting the internals of `ion-modal` to use either the [ion-modal CSS Variables](../api/modal#css-custom-properties) or the [ion-modal CSS Shadow Parts](../api/modal#css-shadow-parts):
@@ -364,7 +364,7 @@ ion-modal::part(backdrop) {
}
```
-### Popover
+### Popover {/* #popover */}
`ion-popover` now uses the Shadow DOM. Update any styles targeting the internals of `ion-popover` to use either [ion-popover CSS Variables](../api/popover#css-custom-properties) or the [ion-popover CSS Shadow Parts](../api/popover#css-shadow-parts):
@@ -400,19 +400,19 @@ ion-popover::part(content) {
}
```
-### Radio
+### Radio {/* #radio */}
Remove any usage of the `RadioChangeEventDetail` interface.
-### Select
+### Select {/* #select */}
Ensure `null` is not passed in as a value to the `placeholder` property. We recommend using `undefined` instead.
-### Textarea
+### Textarea {/* #textarea */}
Ensure `null` is not passed in as a value to the `placeholder` property. We recommend using `undefined` instead.
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -426,7 +426,7 @@ Safari >=13
iOS >=13
```
-### Testing
+### Testing {/* #testing */}
Ionic 6 now ships as ES Modules. ES Modules are supported in all major browsers and bring developer experience and code maintenance improvements. Developers testing with Jest will need to update their Jest configuration as Jest does not have full support for ES Modules as of Jest 27.
@@ -473,7 +473,7 @@ If you are still running into issues, here are a couple things to try:
2. If you have a `browserslist/test` field in `package.json` file, make sure it is set to `current node`.
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to review the [Ionic 6 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING_ARCHIVE/v6.md). There were several changes to default property and CSS Variable values that developers may need to be aware of. Only the breaking changes that required user action are listed on this page.
diff --git a/docs/updating/7-0.mdx b/docs/updating/7-0.mdx
index 2c4ae234f95..df7ab8f0452 100644
--- a/docs/updating/7-0.mdx
+++ b/docs/updating/7-0.mdx
@@ -16,9 +16,9 @@ For a **complete list of breaking changes** from Ionic 6 to Ionic 7, please refe
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 7 supports Angular 14+. Update to the latest version of Angular by following the [Angular Update Guide](https://update.angular.io/).
2. If your project is using rxjs, Ionic 7 requires a minimum rxjs version of 7.5.0:
@@ -41,7 +41,7 @@ npm install @ionic/angular@7 @ionic/angular-server@7 @ionic/angular-toolkit@9
> Note: `@ionic/angular-toolkit@9` requires a minimum of Angular 15. If you are still on Angular 14, then you can skip updating to `@ionic/angular-toolkit@9`.
-### React
+### React {/* #react */}
1. Ionic 7 supports React 17+. Update to the latest version of React:
@@ -55,7 +55,7 @@ npm install react@latest react-dom@latest
npm install @ionic/react@7 @ionic/react-router@7
```
-### Vue
+### Vue {/* #vue */}
1. Ionic 7 supports Vue 3.0.6+. Update to the latest version of Vue:
@@ -69,7 +69,7 @@ npm install vue@latest vue-router@latest
npm install @ionic/vue@7 @ionic/vue-router@7
```
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 7:
@@ -77,9 +77,9 @@ npm install @ionic/vue@7 @ionic/vue-router@7
npm install @ionic/core@7
```
-## Updating Your Code
+## Updating Your Code {/* #updating-your-code */}
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -94,41 +94,41 @@ Safari >=14
iOS >=14
```
-### Types
+### Types {/* #types */}
1. `ActionSheetAttributes`, `AlertAttributes`, `AlertTextareaAttributes`, `AlertInputAttributes`, `LoadingAttributes`, `ModalAttributes`, `PickerAttributes`, `PopoverAttributes`, and `ToastAttributes` have been removed. Developers should use `{ [key: string]: any }` instead.
-### Checkbox
+### Checkbox {/* #checkbox */}
1. Rename any usages of the `--background` and `--background-checked` CSS Variables to `--checkbox-background` and `--checkbox-background-checked`, respectively.
-### Datetime
+### Datetime {/* #datetime */}
1. Remove any code that sets the `value` property to the empty string (`''`).
2. Remove any code that accesses the time zone information on the `value` property. Datetime does not manage time zones, so any time zone information provided is ignored.
-### Input
+### Input {/* #input */}
1. Update any code that accesses the `detail` payload for the `ionInput` event from `event.detail` to `event.detail.value` as the detail payload is now an object containing a value and an event.
-### Modal
+### Modal {/* #modal */}
1. Remove any usage of the `swipeToClose` property. Card modals are swipeable by default, so you can remove `swipeToClose` if you want your card modal to remain swipeable. Use the [canDismiss](https://ionicframework.com/docs/api/modal#preventing-a-modal-from-dismissing) property if you want to prevent a modal from dismissing.
2. Remove any code that sets the `canDismiss` property to `undefined`. The `canDismiss` property now defaults to `true`, so this code is no longer needed.
-### Picker
+### Picker {/* #picker */}
1. Remove any code that accesses `refresh` on `ion-picker-column`. Developers should use the `columns` property on `ion-picker` to refresh the view instead.
-### Searchbar
+### Searchbar {/* #searchbar */}
1. Update any code that accesses the `detail` payload for the `ionInput` event from `event.detail` to `event.detail.value` as the detail payload is now an object containing a value and an event.
-### Segment
+### Segment {/* #segment */}
1. Remove any code that sets the `value` property to `null`. Developers should use either `''` or `undefined` instead.
-### Slides
+### Slides {/* #slides */}
1. Remove `ion-slides`, `ion-slide`, and any associated types. These components have been removed in favor of using Swiper.js directly. The guides below contain more information about this migration:
@@ -136,15 +136,15 @@ iOS >=14
[React Migration Guide](https://ionicframework.com/docs/react/slides)
[Vue Migration Guide](https://ionicframework.com/docs/vue/slides)
-### Textarea
+### Textarea {/* #textarea */}
1. Update any code that accesses the `detail` payload for the `ionInput` event from `event.detail` to `event.detail.value` as the detail payload is now an object containing a value and an event.
-### Toggle
+### Toggle {/* #toggle */}
1. Rename any usages of the `--background` and `--background-checked` CSS Variables to `--track-background` and `--track-background-checked`, respectively.
-### Virtual Scroll
+### Virtual Scroll {/* #virtual-scroll */}
1. Remove `ion-virtual-scroll` and any associated types. This component has been removed in favor of using virtual scroll solutions provided by JavaScript Frameworks. The guides below contain more information about this migration:
@@ -152,7 +152,7 @@ iOS >=14
[React Migration Guide](https://ionicframework.com/docs/react/virtual-scroll)
[Vue Migration Guide](https://ionicframework.com/docs/vue/virtual-scroll)
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to review the [Ionic 7 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-7x). There were several changes to default property and CSS Variable values that developers may need to be aware of. Only the breaking changes that require user action are listed on this page.
diff --git a/docs/updating/8-0.mdx b/docs/updating/8-0.mdx
index f501b609e28..634da530d9e 100644
--- a/docs/updating/8-0.mdx
+++ b/docs/updating/8-0.mdx
@@ -16,9 +16,9 @@ For a **complete list of breaking changes** from Ionic 7 to Ionic 8, please refe
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 8 supports Angular 16+. Update to the latest version of Angular by following the [Angular Update Guide](https://update.angular.io/).
@@ -38,7 +38,7 @@ npm install @ionic/angular@latest @ionic/angular-server@latest @ionic/angular-to
3. Update any `IonBackButtonDelegate` imports from `@ionic/angular` to import `IonBackButton` from `@ionic/angular` instead.
-### React
+### React {/* #react */}
1. Ionic 8 supports React 17+. Update to the latest version of React:
@@ -52,7 +52,7 @@ npm install react@17 react-dom@17
npm install @ionic/react@8 @ionic/react-router@8
```
-### Vue
+### Vue {/* #vue */}
1. Ionic 8 supports Vue 3.0.6+. Update to the latest version of Vue:
@@ -66,7 +66,7 @@ npm install vue@^3.0.6 vue-router@^3.0.6
npm install @ionic/vue@8 @ionic/vue-router@8
```
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 8:
@@ -74,11 +74,11 @@ npm install @ionic/vue@8 @ionic/vue-router@8
npm install @ionic/core@8
```
-## Recommended Changes
+## Recommended Changes {/* #recommended-changes */}
The following changes are not required to update to Ionic 8 as your application will continue to work. However, we recommend making the following changes to ensure you can use the new features in Ionic 8.
-### Light Palette
+### Light Palette {/* #light-palette */}
Previous versions defined a set of default color variables for the light palette in `theme/variables.scss`:
@@ -100,7 +100,7 @@ Developers who are customizing this color palette can continue to keep the custo
You can read more about the new color palette in the [Ionic v8 announcement](https://ionic.io/blog/announcing-the-ionic-8-beta).
-### Dark Palette
+### Dark Palette {/* #dark-palette */}
In previous versions, it was recommended to define the dark palette in the following way:
@@ -134,7 +134,7 @@ While migrating to include the new dark palette files is unlikely to cause break
For more information on the new dark palette files, refer to the [Dark Mode documentation](../theming/dark-mode).
-### Step Color Tokens
+### Step Color Tokens {/* #step-color-tokens */}
To better support the high contrast palette in Ionic 8, separate step colors tokens have been introduced for text and background color. Previously both text and background color were controlled by a single set of `--ion-color-step-[number]` tokens.
@@ -170,7 +170,7 @@ button { color: var(--ion-text-color-step-600); /* 1000 - 400 = 600 */ }
The [stepped color generator](../theming/themes#stepped-color-generator) has been updated to generate text and background color stepped variables.
-### Dynamic Font
+### Dynamic Font {/* #dynamic-font */}
The `core.css` file has been updated to enable dynamic font scaling by default.
@@ -182,7 +182,7 @@ Developers who want to disable dynamic font scaling can set `--ion-dynamic-font:
For more information on the dynamic font, refer to the [Dynamic Font Scaling documentation](../layout/dynamic-font-scaling).
-### (Angular Only) `angular.json` CSS import order
+### (Angular Only) `angular.json` CSS import order {/* #angular-only-angularjson-css-import-order */}
The `angular.json` file currently imports `src/theme/variables.scss` before importing `src/global.scss`. This may cause the incorrect styles to be applied when customizing the new [Dark Palette](#dark-palette) changes.
@@ -200,9 +200,9 @@ We recommend importing the `src/global.scss` file first instead:
"styles": ["src/global.scss", "src/theme/variables.scss"],
```
-## Required Changes
+## Required Changes {/* #required-changes */}
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -217,51 +217,51 @@ Safari >=15
iOS >=15
```
-### Checkbox
+### Checkbox {/* #checkbox */}
1. Migrate any remaining instances of Checkbox to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/checkbox#migrating-from-legacy-checkbox-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Input
+### Input {/* #input */}
1. Remove any usages of the `size` property. CSS should be used to specify the visible width of the input instead.
2. Remove any usages of the `accept` property.
3. Migrate any remaining instances of Input to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/input#migrating-from-legacy-input-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Item
+### Item {/* #item */}
1. Remove any usages of the `counter` or `counterFormatter` properties. Use the properties of the same names on `ion-input` and `ion-textarea` instead.
2. Remove any usages of the `helper` or `error` slots. Use the `helperText` and `errorText` properties on `ion-input` and `ion-textarea` instead.
3. Remove any usages of the `fill` or `shape` properties. Use the properties of the same names on `ion-input`, `ion-textarea`, and `ion-select` instead.
-### Nav
+### Nav {/* #nav */}
1. Update any usages of `getLength` to `await` the call before accessing the returned value as this method now returns `Promise` instead of `number`.
-### Picker
+### Picker {/* #picker */}
1. Ionic 8 now ships with an inline `ion-picker` component. Developers who wish to continue using the legacy picker should update any `ion-picker` usages to `ion-picker-legacy`. The `pickerController` import remains unchanged. Note that the `ion-picker-legacy` component will be removed in an upcoming major release of Ionic. Refer to the [Picker documentation](../api/picker) for usage information.
-### Toast
+### Toast {/* #toast */}
1. Remove any usages of the `cssClass` property from `ToastButton`. The `button` CSS Shadow Part should be used instead.
-### Radio
+### Radio {/* #radio */}
1. Migrate any remaining instances of Radio to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/radio#migrating-from-legacy-radio-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Select
+### Select {/* #select */}
1. Migrate any remaining instances of Select to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/select#migrating-from-legacy-select-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Textarea
+### Textarea {/* #textarea */}
1. Migrate any remaining instances of Textarea to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/textarea#migrating-from-legacy-textarea-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Toggle
+### Toggle {/* #toggle */}
1. Migrate any remaining instances of Toggle to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/toggle#migrating-from-legacy-toggle-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to review the [Ionic 8 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-8x). There were several changes to default property and CSS Variable values that developers may need to be aware of. Only the breaking changes that require user action are listed on this page.
diff --git a/docs/updating/9-0.mdx b/docs/updating/9-0.mdx
index 88a4a542c4c..d70fbb75c09 100644
--- a/docs/updating/9-0.mdx
+++ b/docs/updating/9-0.mdx
@@ -16,7 +16,7 @@ For a **complete list of breaking changes** from Ionic 8 to Ionic 9, please refe
:::
-## Automated Migration
+## Automated Migration {/* #automated-migration */}
Before manually working through the changes below, you can run the Ionic migration tool. It scans your app, automatically applies the breaking changes that can be safely migrated, and prints a checklist of the remaining updates that require manual work. Each item includes the affected file, line number, and a link to the corresponding section of this guide. Because the tool reads your framework and version from `package.json`, it only applies migrations that are relevant to your app.
@@ -45,9 +45,9 @@ Run `npx @ionic/migrate --help` for the full list.
The tool is single-shot. Once it bumps your `@ionic/*` version, a re-run detects the new major and does nothing, so run it once per major upgrade and review the diff before committing.
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 9 supports Angular 18 through 22. Angular 16 and 17 are no longer supported. Update to a supported version of Angular by following the [Angular Update Guide](https://update.angular.io/).
@@ -63,7 +63,7 @@ If you are using Ionic Angular Server and Ionic Angular Toolkit, be sure to upda
npm install @ionic/angular@latest @ionic/angular-server@latest @ionic/angular-toolkit@latest
```
-#### Zoneless Change Detection
+#### Zoneless Change Detection {/* #zoneless-change-detection */}
Ionic 9 supports zoneless change detection. Angular 21 made zoneless the default, so a new Ionic 9 app on Angular 21 or later runs without Zone.js out of the box and no change-detection provider is required.
@@ -75,7 +75,7 @@ On Angular 18 through 20, Zone.js remains Angular's default, so those versions a
:::
-##### Keeping Zone.js
+##### Keeping Zone.js {/* #keeping-zonejs */}
If you prefer to keep using Zone.js on Angular 21 or later, opt back in with `provideZoneChangeDetection()`.
@@ -121,7 +121,7 @@ If your project uses a polyfills file instead (for example, Ionic starters set `
import 'zone.js';
```
-#### OnPush Change Detection on Angular 22
+#### OnPush Change Detection on Angular 22 {/* #onpush-change-detection-on-angular-22 */}
Angular 22 changes the default change detection strategy to `OnPush` for components that don't declare one. Combined with the zoneless default above, component state you mutate as a plain field from an Ionic lifecycle hook (`ionViewWillEnter`, and so on) no longer re-renders on its own.
@@ -148,23 +148,23 @@ Ionic's own Angular components already declare `OnPush`, so they are unaffected.
:::
-#### TypeScript
+#### TypeScript {/* #typescript */}
Ionic 9 supports TypeScript 5.4 or later, matching the minimum for Angular 18. Angular 21 requires TypeScript 5.9 or later, and Angular 22 requires TypeScript 6.0 or later.
-#### Node.js
+#### Node.js {/* #nodejs */}
Angular 22 raises the minimum Node.js version to `^22.22.3 || ^24.15.0 || ^26.0.0`. Angular 18 through 21 are unaffected.
-#### Component Imports
+#### Component Imports {/* #component-imports */}
Ionic 9 makes standalone components the default import path. Change lazy-loaded component imports from `@ionic/angular` to `@ionic/angular/lazy`. Change standalone component imports from `@ionic/angular/standalone` to `@ionic/angular`.
-#### IonicModule Deprecation
+#### IonicModule Deprecation {/* #ionicmodule-deprecation */}
`IonicModule` is deprecated in Ionic 9 and will be removed in a future major version. It remains fully functional, so no immediate action is required. When you are ready, migrate to `provideIonicAngular()`, which works in both standalone and NgModule-based apps. Refer to [Migrating from Modules to Standalone](/angular/build-options.mdx#migrating-from-modules-to-standalone).
-#### CSS Imports
+#### CSS Imports {/* #css-imports */}
Remove the `~` prefix from `@ionic/angular` CSS imports. Angular's current build pipeline no longer supports the webpack-loader prefix:
@@ -173,11 +173,11 @@ Remove the `~` prefix from `@ionic/angular` CSS imports. Angular's current build
+ @import '@ionic/angular/css/core.css';
```
-#### Module Resolution
+#### Module Resolution {/* #module-resolution */}
If your app uses TypeScript `moduleResolution: "node"` (classic), imports from subpaths such as `@ionic/angular/lazy` can fail to resolve. Set `moduleResolution` to `"bundler"` in your `tsconfig.json`. Apps created with `ng new` on Angular 17 or later already use this.
-### React
+### React {/* #react */}
1. Ionic 9 supports React 18+. Update to the latest version of React:
@@ -195,7 +195,7 @@ npm install @ionic/react@latest @ionic/react-router@latest
The `@ionic/react` package requires TypeScript 5.4 or later. Its type definitions use `NoInfer`, which TypeScript added in 5.4.
-#### Typed Overlay Hook Props
+#### Typed Overlay Hook Props {/* #typed-overlay-hook-props */}
The `useIonModal` and `useIonPopover` hooks now type `componentProps` against the component they are given, instead of accepting `any`. Passing props that do not match the component is a compile error, and `componentProps` is required when the component declares required props:
@@ -227,7 +227,7 @@ Running the [migration tool](#automated-migration) with `npx @ionic/migrate --ex
Passing a JSX element rather than a component behaves as before: props are bound to the element and `componentProps` is not type checked.
-### React Router
+### React Router {/* #react-router */}
1. Ionic 9 supports React Router 6. Update to version 6 of React Router:
@@ -243,7 +243,7 @@ npm uninstall @types/react-router @types/react-router-dom
Ionic React now requires React Router v6, which has a different API from v5. Below are the key changes you'll need to make.
-#### Route Definition Changes
+#### Route Definition Changes {/* #route-definition-changes */}
The `component` and `render` props have been replaced with the `element` prop, which accepts JSX:
@@ -261,7 +261,7 @@ Routes can no longer render content via nested children. All route content must
+ } />
```
-#### Redirect Changes
+#### Redirect Changes {/* #redirect-changes */}
The `` component has been replaced with ``:
@@ -273,7 +273,7 @@ The `` component has been replaced with ``:
+
```
-#### Nested Route Paths
+#### Nested Route Paths {/* #nested-route-paths */}
Routes that contain nested routes or child `IonRouterOutlet` components need a `/*` suffix to match sub-paths:
@@ -282,7 +282,7 @@ Routes that contain nested routes or child `IonRouterOutlet` components need a `
+ } />
```
-#### Accessing Route Parameters
+#### Accessing Route Parameters {/* #accessing-route-parameters */}
Route parameters are now accessed via the `useParams` hook instead of props:
@@ -296,7 +296,7 @@ Route parameters are now accessed via the `useParams` hook instead of props:
+ const { id } = useParams<{ id: string }>();
```
-#### RouteComponentProps Removed
+#### RouteComponentProps Removed {/* #routecomponentprops-removed */}
The `RouteComponentProps` type and its `history`, `location`, and `match` props are no longer available in React Router v6. Use the equivalent hooks instead:
@@ -325,7 +325,7 @@ The `RouteComponentProps` type and its `history`, `location`, and `match` props
+ console.log(location.pathname);
```
-#### Exact Prop Removed
+#### Exact Prop Removed {/* #exact-prop-removed */}
The `exact` prop is no longer needed. React Router v6 routes match exactly by default. To match sub-paths, use a `/*` suffix on the path:
@@ -334,7 +334,7 @@ The `exact` prop is no longer needed. React Router v6 routes match exactly by de
+
```
-#### Render Prop Removed
+#### Render Prop Removed {/* #render-prop-removed */}
The `render` prop has been replaced with the `element` prop:
@@ -343,7 +343,7 @@ The `render` prop has been replaced with the `element` prop:
+ } />
```
-#### Programmatic Navigation
+#### Programmatic Navigation {/* #programmatic-navigation */}
The `useHistory` hook has been replaced with `useNavigate`:
@@ -366,7 +366,7 @@ The `useHistory` hook has been replaced with `useNavigate`:
+ router.goBack();
```
-#### Custom History Prop Removed
+#### Custom History Prop Removed {/* #custom-history-prop-removed */}
The `history` prop has been removed from `IonReactRouter`, `IonReactHashRouter`, and `IonReactMemoryRouter`. React Router v6 routers no longer accept custom `history` objects.
@@ -386,7 +386,7 @@ For `IonReactMemoryRouter` (commonly used in tests), use `initialEntries` instea
+
```
-#### IonRedirect Removed
+#### IonRedirect Removed {/* #ionredirect-removed */}
The `IonRedirect` component has been removed. Use React Router's `` component instead:
@@ -397,7 +397,7 @@ The `IonRedirect` component has been removed. Use React Router's `` co
+ } />
```
-#### Path Regex Constraints Removed
+#### Path Regex Constraints Removed {/* #path-regex-constraints-removed */}
React Router v6 no longer supports regex constraints in path parameters (e.g., `/:tab(sessions)`). Use literal paths instead:
@@ -408,7 +408,7 @@ React Router v6 no longer supports regex constraints in path parameters (e.g., `
+ } />
```
-#### IonRoute API Changes
+#### IonRoute API Changes {/* #ionroute-api-changes */}
The `IonRoute` component follows the same API changes as React Router's ``. The `render` prop has been replaced with `element`, and the `exact` prop has been removed:
@@ -419,7 +419,7 @@ The `IonRoute` component follows the same API changes as React Router's `
For more information on migrating from React Router v5 to v6, refer to the [React Router v6 Upgrade Guide](https://reactrouter.com/6.28.0/upgrading/v5).
-### Vue
+### Vue {/* #vue */}
1. Ionic 9 supports Vue 3.5+. Update to the latest version of Vue:
@@ -433,7 +433,7 @@ npm install vue@latest
npm install @ionic/vue@latest @ionic/vue-router@latest
```
-### Vue Router
+### Vue Router {/* #vue-router */}
1. Ionic 9 supports Vue Router 5. Update to the latest version of Vue Router:
@@ -445,7 +445,7 @@ npm install vue-router@5
Vue Router v5 is a transition release that ships no runtime breaking changes for Vue Router v4 consumers, so no application code changes are required for routes, navigation guards, or `IonRouterOutlet`.
-#### Deprecation Warning for `next()` in Navigation Guards
+#### Deprecation Warning for `next()` in Navigation Guards {/* #deprecation-warning-for-next-in-navigation-guards */}
Vue Router v5 prints a deprecation warning when `next()` is called inside `beforeRouteLeave`, `beforeRouteEnter`, `beforeRouteUpdate`, or `router.beforeEach`. The callback form still works, but Vue Router v6 will remove it. Migrate to the return-value pattern:
@@ -472,7 +472,7 @@ Vue Router v5 prints a deprecation warning when `next()` is called inside `befor
For more information on migrating from Vue Router v4 to v5, refer to the [Vue Router v4-to-v5 migration guide](https://router.vuejs.org/guide/migration/v4-to-v5.html).
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 9:
@@ -480,7 +480,7 @@ For more information on migrating from Vue Router v4 to v5, refer to the [Vue Ro
npm install @ionic/core@latest
```
-#### Package Exports
+#### Package Exports {/* #package-exports */}
`@ionic/core`'s `package.json` now declares an `exports` field. This fixes subpaths like `@ionic/core/components` and `@ionic/core/loader` failing under Node ESM with `ERR_UNSUPPORTED_DIR_IMPORT`. The strict ESM resolver doesn't read the nested `package.json` files the package previously relied on, and the `exports` field replaces them. This affects toolchains such as Angular 21's default Vitest builder and raw Node.
@@ -497,9 +497,9 @@ The `exports` field defines the supported public entry points, and imports of pa
Apps on `moduleResolution: "node"` (classic) and webpack 4 keep resolving through the legacy fields and need no changes.
-## Required Changes
+## Required Changes {/* #required-changes */}
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -514,13 +514,13 @@ Safari >=16
iOS >=16
```
-### Capacitor
+### Capacitor {/* #capacitor */}
Ionic 9 officially supports Capacitor 7 and later. Native platform detection no longer falls back to the Capacitor 2 `isNative` flag; `isCapacitorNative` now relies solely on `Capacitor.isNativePlatform()`, which was added in Capacitor 3.
If your app is still on Capacitor 2, it will no longer be detected as running on a native platform, so `isPlatform('capacitor')`, `isPlatform('hybrid')`, and `getPlatforms()` will report `web` instead of native. Upgrade to Capacitor 7 or later by following the [Capacitor updating guides](https://capacitorjs.com/docs/updating/7-0).
-### Img
+### Img {/* #img */}
`ion-img` is deprecated and will be removed in Ionic 10. The component was created to lazy-load images before browsers supported lazy loading natively. Modern browsers now support the [`loading="lazy"`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#loading) attribute on the native `` element, so the component is no longer needed.
@@ -531,7 +531,7 @@ Replace `ion-img` with a native `` tag. Add `loading="lazy"` for lazy loadi
+
```
-#### Events
+#### Events {/* #events */}
The native `` element does not emit Ionic's custom events. Use the standard DOM events instead:
@@ -543,7 +543,7 @@ The native `` element does not emit Ionic's custom events. Use the standard
¹ Native `load` and `error` do not bubble, while the Ionic events did. If you used event delegation (one listener on a parent), listen on each `` instead, or use the capture phase: `parent.addEventListener('load', handler, true)`.
-#### Styling
+#### Styling {/* #styling */}
`ion-img` exposed an `image` CSS shadow part for styling the inner image. With a native ``, style the element directly instead:
@@ -556,7 +556,7 @@ The native `` element does not emit Ionic's custom events. Use the standard
+ }
```
-### Input
+### Input {/* #input */}
#### `autocorrect` Property Type Changed to Boolean {/* #input-autocorrect-property-type-changed-to-boolean */}
@@ -604,7 +604,7 @@ Update your selectors to account for these structural changes:
+ion-input .input-end [slot="end"] { }
```
-### Legacy Picker
+### Legacy Picker {/* #legacy-picker */}
The `ion-picker-legacy` and `ion-picker-legacy-column` components have been removed.
@@ -612,9 +612,9 @@ The `ion-picker-legacy` and `ion-picker-legacy-column` components have been remo
- Remove any usages of `pickerController`. If using React, remove any usages of the `useIonPicker` hook. These controller-based APIs have been removed. Use the [Picker](../api/picker.mdx) component instead.
- Remove any usages of the `PickerOptions`, `PickerButton`, `PickerColumn`, and `PickerColumnOption` type exports. These types were associated with the legacy picker and have been removed.
-### Modal
+### Modal {/* #modal */}
-#### `handleBehavior` Default Changed
+#### `handleBehavior` Default Changed {/* #handlebehavior-default-changed */}
The `handleBehavior` property on `ion-modal` now defaults to `"cycle"` instead of `"none"`. For sheet modals that display a handle, this means the handle is now focusable and activating it (by click, keyboard, or screen reader) cycles the sheet through its available breakpoints. This matches the native iOS sheet behavior and keeps sheet modals operable for assistive technology users by default.
@@ -624,9 +624,9 @@ Sheet modals that relied on the handle being inert should set `handleBehavior="n
```
-### Nav
+### Nav {/* #nav */}
-#### Router Integration Removed
+#### Router Integration Removed {/* #router-integration-removed */}
`ion-nav` no longer integrates with `ion-router`. It is now a standalone imperative stack navigation component, driven only through its own API (`root`, `push`, `pop`, `setRoot`, and so on) and `ion-nav-link`.
@@ -652,11 +652,11 @@ If you relied on `ion-nav` to update the URL, use `ion-router-outlet` for URL-ba
An `ion-nav` can still be nested inside a routed page for local, URL-less stack navigation. It manages its own stack via `root` and `ion-nav-link`, and the URL never changes as you push and pop. For a complete, working example, refer to [Using ion-nav within a Routed Page](../api/router.mdx#using-ion-nav-within-a-routed-page).
-### Router Outlet
+### Router Outlet {/* #router-outlet */}
`ion-router-outlet` now exposes a `swipeGesture` property that controls the swipe-to-go-back gesture per outlet. This property defaults to `true` in `"ios"` mode and `false` in `"md"` mode.
-#### `swipeBackEnabled` Config Behavior Change
+#### `swipeBackEnabled` Config Behavior Change {/* #swipebackenabled-config-behavior-change */}
In React and Vue, the `swipeBackEnabled` config option is now read once when the outlet mounts. Apps that dynamically toggle this config value at runtime should migrate to the `swipeGesture` property instead.
@@ -674,7 +674,7 @@ In React and Vue, the `swipeBackEnabled` config option is now read once when the
+
```
-#### Disabling Swipe-to-Go-Back
+#### Disabling Swipe-to-Go-Back {/* #disabling-swipe-to-go-back */}
To disable the gesture on a specific outlet, set `swipeGesture` to `false`:
@@ -684,7 +684,7 @@ To disable the gesture on a specific outlet, set `swipeGesture` to `false`:
The `swipeBackEnabled` config option is still respected as the initial default and does not need to change for apps that set it once at startup.
-### Searchbar
+### Searchbar {/* #searchbar */}
#### `autocorrect` Property Type Changed to Boolean {/* #searchbar-autocorrect-property-type-changed-to-boolean */}
@@ -693,15 +693,15 @@ The `autocorrect` property on `ion-searchbar` is now a `boolean` (default `false
- Remove the attribute to keep autocorrect disabled (the default).
- Use a property binding to enable it: `[autocorrect]="true"` (Angular), `autocorrect={true}` (React), or `:autocorrect="true"` (Vue).
-### Select
+### Select {/* #select */}
-#### `ionChange` Only Fires When the Value Changes
+#### `ionChange` Only Fires When the Value Changes {/* #ionchange-only-fires-when-the-value-changes */}
The `ionChange` event on `ion-select` now only fires when the selected value actually changes. Previously, the `alert` and `action-sheet` interfaces emitted `ionChange` every time the overlay was confirmed, even when the user chose the option that was already selected. This aligns the `alert` and `action-sheet` interfaces with the existing behavior of the `popover` and `modal` interfaces, and with the documented contract of `ionChange`.
Apps that relied on `ionChange` firing on every confirmation (for example, to detect overlay dismissal without a value change) should listen for `ionDismiss` instead, or use the `didDismiss` event on the underlying alert or action sheet.
-#### Action Sheet Interface `selected` Role Removed
+#### Action Sheet Interface `selected` Role Removed {/* #action-sheet-interface-selected-role-removed */}
When using `interface="action-sheet"`, `ion-select` no longer assigns the `selected` role to the action sheet button for the currently selected option. This aligns the `action-sheet` interface with the `alert`, `popover`, and `modal` interfaces, none of which assign this role. This does not change the selected option's styling.
@@ -743,7 +743,7 @@ If you target `part="label"`, `part="container"`, or `part="icon"`, the part nam
Use the new `part="start"`, `part="control"`, and `part="end"` parts to target the new structural wrappers.
-### Textarea
+### Textarea {/* #textarea */}
#### Floating Label Behavior {/* #textarea-floating-label-behavior */}
@@ -782,7 +782,7 @@ Update your selectors to account for these structural changes:
+ion-textarea .textarea-end [slot="end"] { }
```
-#### Minimum Height Change
+#### Minimum Height Change {/* #minimum-height-change */}
The minimum height of textarea in Material Design (`md` mode) is now `72px`. At the default number of rows this makes textareas the same height regardless of the `fill` property or `labelPlacement`. Previously the minimum height was:
@@ -805,7 +805,7 @@ ion-textarea.custom {
}
```
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to look at the [Ionic 9 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-9x) for the complete list of breaking changes. This upgrade guide only covers changes that require action from developers.
diff --git a/docs/utilities/animations.mdx b/docs/utilities/animations.mdx
index c895cc9af82..c7e0ccdff75 100644
--- a/docs/utilities/animations.mdx
+++ b/docs/utilities/animations.mdx
@@ -14,7 +14,7 @@ import TabItem from '@theme/TabItem';
/>
-## Overview
+## Overview {/* #overview */}
Ionic Animations is a tool that enables developers to create complex animations in a platform-agnostic manner, without requiring a specific framework or an Ionic app.
@@ -22,7 +22,7 @@ Creating efficient animations can be challenging, as developers are limited by t
Ionic Animations, on the other hand, uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API), which offloads all the computation and running of animations to the browser. This approach allows the browser to optimize the animations and ensure their smooth execution. In cases where Web Animations are not supported, Ionic Animations will fall back to [CSS Animations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations), which should have a negligible difference in performance.
-## Installation
+## Installation {/* #installation */}
````mdx-code-block
````
-## Basic Animations
+## Basic Animations {/* #basic-animations */}
In the example below, an animation that changes the opacity on the `ion-card` element and moves it from left to right along the X axis has been created. This animation will run an infinite number of times, and each iteration of the animation will last 1500ms.
@@ -166,7 +166,7 @@ import Basic from '@site/static/usage/v10/animations/basic/index.mdx';
-## Keyframe Animations
+## Keyframe Animations {/* #keyframe-animations */}
Ionic Animations allows you to control the intermediate steps in an animation using keyframes. Any valid CSS property can be used here, and you can even use CSS Variables as values.
@@ -180,7 +180,7 @@ In the example above, the card element will transition from its initial width, t
Each keyframe object contains an `offset` property. `offset` is a value between 0 and 1 that defines the keyframe step. Offset values must go in ascending order and cannot repeat.
-## Grouped Animations
+## Grouped Animations {/* #grouped-animations */}
Multiple elements can be animated at the same time and controlled via a single parent animation object. Child animations inherit properties such as duration, easing, and iterations unless otherwise specified. A parent animation's `onFinish` callback will not be called until all child animations have completed.
@@ -190,7 +190,7 @@ import Group from '@site/static/usage/v10/animations/group/index.mdx';
-## Before and After Hooks
+## Before and After Hooks {/* #before-and-after-hooks */}
Ionic Animations provides hooks that let you alter an element before an animation runs and after an animation completes. These hooks can be used to perform DOM reads and writes as well as add or remove classes and inline styles.
@@ -202,7 +202,7 @@ import BeforeAndAfterHooks from '@site/static/usage/v10/animations/before-and-af
-## Chained Animations
+## Chained Animations {/* #chained-animations */}
Animations can be chained to run one after the other. The `play` method returns a Promise that resolves when the animation has completed.
@@ -210,7 +210,7 @@ import Chain from '@site/static/usage/v10/animations/chain/index.mdx';
-## Gesture Animations
+## Gesture Animations {/* #gesture-animations */}
Ionic Animations gives developers the ability to create powerful gesture-based animations by integrating seamlessly with [Ionic Gestures](gestures.mdx).
@@ -220,7 +220,7 @@ import Gesture from '@site/static/usage/v10/animations/gesture/index.mdx';
-## Preference-Based Animations
+## Preference-Based Animations {/* #preference-based-animations */}
Developers can also tailor their animations to user preferences such as `prefers-reduced-motion` and `prefers-color-scheme` using CSS Variables.
@@ -232,17 +232,17 @@ import PreferenceBased from '@site/static/usage/v10/animations/preference-based/
-## Overriding Ionic Component Animations
+## Overriding Ionic Component Animations {/* #overriding-ionic-component-animations */}
Certain Ionic components allow developers to provide custom animations. All animations are provided as either properties on the component or are set via a global config.
-### Modals
+### Modals {/* #modals */}
import ModalOverride from '@site/static/usage/v10/animations/modal-override/index.mdx';
-## Performance Considerations
+## Performance Considerations {/* #performance-considerations */}
CSS and Web Animations are usually handled on the compositor thread. This is different than the main thread where layout, painting, styling, and your JavaScript is executed. It is recommended that you prefer using properties that can be handled on the compositor thread for optimal animation performance.
@@ -250,7 +250,7 @@ Animating properties such as `height` and `width` cause additional layouts and p
For information on which CSS properties cause layouts or paints to occur, refer to [CSS Triggers](https://csstriggers.com/).
-## Debugging
+## Debugging {/* #debugging */}
For debugging animations in Chrome, there is a great blog post about inspecting animations using the Chrome DevTools: https://developers.google.com/web/tools/chrome-devtools/inspect-styles/animations.
@@ -267,25 +267,25 @@ const animation = createAnimation('my-animation-identifier')
.fromTo('opacity', '1', '0');
```
-## API
+## API {/* #api */}
This section provides a list of all the methods and properties available on the `Animation` class.
-### Interfaces
+### Interfaces {/* #interfaces */}
-#### AnimationDirection
+#### AnimationDirection {/* #animationdirection */}
```tsx
type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
```
-#### AnimationFill
+#### AnimationFill {/* #animationfill */}
```tsx
type AnimationFill = 'auto' | 'none' | 'forwards' | 'backwards' | 'both';
```
-#### AnimationBuilder
+#### AnimationBuilder {/* #animationbuilder */}
```tsx
type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
@@ -297,7 +297,7 @@ type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
:::
-#### AnimationCallbackOptions
+#### AnimationCallbackOptions {/* #animationcallbackoptions */}
```tsx
interface AnimationCallbackOptions {
@@ -308,7 +308,7 @@ interface AnimationCallbackOptions {
}
```
-#### AnimationPlayOptions
+#### AnimationPlayOptions {/* #animationplayoptions */}
```tsx
interface AnimationPlayOptions {
@@ -321,7 +321,7 @@ interface AnimationPlayOptions {
}
```
-### Properties
+### Properties {/* #properties */}
| Name | Description |
| ------------------------------ | ------------------------------------------------- |
@@ -329,7 +329,7 @@ interface AnimationPlayOptions {
| `elements: HTMLElement[]` | All elements attached to an animation. |
| `parentAnimation?: Animation` | The parent animation of a given animation object. |
-### Methods
+### Methods {/* #methods */}
| Name | Description |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/docs/utilities/gestures.mdx b/docs/utilities/gestures.mdx
index b6517366abc..72ccc43fd44 100644
--- a/docs/utilities/gestures.mdx
+++ b/docs/utilities/gestures.mdx
@@ -14,13 +14,13 @@ import TabItem from '@theme/TabItem';
/>
-## Overview
+## Overview {/* #overview */}
Ionic Gestures is a utility that allows developers to build custom gestures and interactions for their application in a platform agnostic manner. Developers do not need to be using a particular framework such as React or Angular, nor do they even need to be building an Ionic app! As long as developers have access to v5.0 or greater of Ionic Framework, they will have access to all of Ionic Gestures.
Building complex gestures can be time consuming. Other libraries that provide custom gestures are often times too heavy handed and end up capturing mouse or touch events and not letting them propagate. This can result in other elements no longer being scrollable or clickable.
-## Installation
+## Installation {/* #installation */}
````mdx-code-block
````
-## Basic Gestures
+## Basic Gestures {/* #basic-gestures */}
import Basic from '@site/static/usage/v10/gestures/basic/index.mdx';
@@ -168,7 +168,7 @@ In this example, our app listens for gestures on the `ion-content` element. When
-## Double Click Gesture
+## Double Click Gesture {/* #double-click-gesture */}
import DoubleClick from '@site/static/usage/v10/gestures/double-click/index.mdx';
@@ -176,19 +176,19 @@ In the example below, we want to be able to detect double clicks on an element.
-## Gesture Animations
+## Gesture Animations {/* #gesture-animations */}
See our guide on implementing gesture animations: [Gesture Animations with Ionic Animations](animations.mdx#gesture-animations)
-## Types
+## Types {/* #types */}
| Name | Value |
| ----------------- | -------------------------------------------- |
| `GestureCallback` | `(detail: GestureDetail) => boolean \| void` |
-## Interfaces
+## Interfaces {/* #interfaces */}
-### GestureConfig
+### GestureConfig {/* #gestureconfig */}
| Property | Type | Default | Description |
| --------------- | ------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -208,7 +208,7 @@ See our guide on implementing gesture animations: [Gesture Animations with Ionic
| onEnd | `GestureCallback \| undefined` | `undefined` | A callback that fires when a gesture has ended. This is usually when a pointer has been released. |
| notCaptured | `GestureCallback \| undefined` | `undefined` | A callback that fires when a gesture has not been captured. This usually happens when there is a conflicting gesture with a higher priority. |
-### GestureDetail
+### GestureDetail {/* #gesturedetail */}
| Property | Type | Description |
| -------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -226,12 +226,12 @@ See our guide on implementing gesture animations: [Gesture Animations with Ionic
| event | `UIEvent` | The native event dispatched by the browser. Refer to [UIEvent](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent) for more information. |
| data | `any \| undefined` | Any data specified by the user. This can be set and read in any of the callbacks. |
-## Methods
+## Methods {/* #methods */}
-#### `enable(enable: boolean = true) => void`
+#### `enable(enable: boolean = true) => void` {/* #enableenable-boolean--true--void */}
Enable or disable the gesture.
-#### `destroy() => void`
+#### `destroy() => void` {/* #destroy--void */}
Destroy the gesture instance and stop listening on the target element.
diff --git a/docs/vue/add-to-existing.mdx b/docs/vue/add-to-existing.mdx
index d47b18d21d4..863fdd2358b 100644
--- a/docs/vue/add-to-existing.mdx
+++ b/docs/vue/add-to-existing.mdx
@@ -22,7 +22,7 @@ This guide uses JavaScript examples. If you're using TypeScript, the setup proce
:::
-## Setup
+## Setup {/* #setup */}
:::info
@@ -32,13 +32,13 @@ This guide follows the structure of a Vue app created with `create-vue` (which u
Follow these steps to add Ionic Vue to your existing Vue project:
-#### 1. Install the Packages
+#### 1. Install the Packages {/* #1-install-the-packages */}
```bash
npm install @ionic/vue @ionic/vue-router vue-router
```
-#### 2. Configure Ionic Vue
+#### 2. Configure Ionic Vue {/* #2-configure-ionic-vue */}
Update `src/main.js` to include `IonicVue` and import the required Ionic Framework stylesheets:
@@ -65,7 +65,7 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography.
:::
-## Using Individual Components
+## Using Individual Components {/* #using-individual-components */}
After completing the setup above, you can start using Ionic components in your existing Vue app. Here's an example of how to use them:
@@ -84,11 +84,11 @@ import { IonButton, IonDatetime } from '@ionic/vue';
Visit the [components](/components.mdx) page for all of the available Ionic components.
-## Using Ionic Pages
+## Using Ionic Pages {/* #using-ionic-pages */}
If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
-#### 1. Add Additional Ionic Framework Stylesheets
+#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
Update the imported stylesheets in `src/main.js`:
@@ -112,7 +112,7 @@ import '@ionic/vue/css/display.css';
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 {/* #2-set-up-theming */}
Create a `src/theme/variables.css` file with the following content:
@@ -164,7 +164,7 @@ createApp(App).use(IonicVue).mount('#app');
The `variables.css` file can be used to create custom Ionic Framework themes. The `dark.system.css` import 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 to `theme/variables.css`.
-#### 3. Update the App Component
+#### 3. Update the App Component {/* #3-update-the-app-component */}
Update `src/App.vue` to the following:
@@ -180,7 +180,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/vue';
```
-#### 4. Create a Home Page
+#### 4. Create a Home Page {/* #4-create-a-home-page */}
Create a new file at `src/views/HomePage.vue` with the following:
@@ -248,7 +248,7 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
```
-#### 5. Set up Routing
+#### 5. Set up Routing {/* #5-set-up-routing */}
Add a file at `src/router/index.js` defining the routes:
@@ -324,7 +324,7 @@ router.isReady().then(() => {
You're all set! Your Ionic Vue app is now configured with full Ionic page support. Run `npm run dev` to start your development server and view your app.
-## Next Steps
+## Next Steps {/* #next-steps */}
Now that you have Ionic Vue integrated into your project, check out:
diff --git a/docs/vue/build-options.mdx b/docs/vue/build-options.mdx
index ef4a6eb0189..327936877ed 100644
--- a/docs/vue/build-options.mdx
+++ b/docs/vue/build-options.mdx
@@ -16,9 +16,9 @@ import DocsCards from '@components/global/DocsCards';
Vue gives you several tools to fine tune your application. This guide covers the build options that are most relevant to Ionic Framework.
-## Component Registration Strategies
+## Component Registration Strategies {/* #component-registration-strategies */}
-### Local Component Registration (Recommended)
+### Local Component Registration (Recommended) {/* #local-component-registration-recommended */}
By default, Ionic Framework components are registered locally. With local registration, these components are imported and provided to each Vue component you want to use them in. This is the recommended approach as it allows lazy loading and treeshaking to work properly with Ionic Framework components.
@@ -49,7 +49,7 @@ Note that since we are registering these components locally, neither `IonPage` n
For more information, refer to the [Local Registration Vue Documentation](https://v3.vuejs.org/guide/component-registration.html#local-registration).
-### Global Component Registration
+### Global Component Registration {/* #global-component-registration */}
The other option for registering components is to use global registration. Global registration involves importing the components you want to use in `main.ts` and calling the `component` method on your Vue app instance.
@@ -88,9 +88,9 @@ In the example above, we are using the `IonPage` and `IonContent` components. To
For more information, refer to the [Global Registration Vue Documentation](https://v3.vuejs.org/guide/component-registration.html#global-registration).
-## Build Optimization
+## Build Optimization {/* #build-optimization */}
-### Prefetching Application JavaScript
+### Prefetching Application JavaScript {/* #prefetching-application-javascript */}
By default, the Vue CLI will automatically generate prefetch hints for the JavaScript in your application. Prefetching utilizes the browser idle time to download documents that the user might visit in the near future. When the user visits a page that requires the prefetched document, it can be served quickly from the browser's cache.
diff --git a/docs/vue/lifecycle.mdx b/docs/vue/lifecycle.mdx
index 3b701321eaf..1b84568b3ed 100644
--- a/docs/vue/lifecycle.mdx
+++ b/docs/vue/lifecycle.mdx
@@ -6,7 +6,7 @@ sidebar_label: Lifecycle
This guide discusses how to use the Ionic Framework Lifecycle events in an Ionic Vue application.
-## Ionic Framework Lifecycle Methods
+## Ionic Framework Lifecycle Methods {/* #ionic-framework-lifecycle-methods */}
Ionic Framework provides a few lifecycle methods that you can use in your apps:
@@ -43,7 +43,7 @@ const ionViewWillLeave = () => {
```
-### Composition API Hooks
+### Composition API Hooks {/* #composition-api-hooks */}
These lifecycles can also be expressed using Vue 3's Composition API:
@@ -75,7 +75,7 @@ Pages in your app need to be using the `IonPage` component in order for lifecycl
:::
-## How Ionic Framework Handles the Life of a Page
+## How Ionic Framework Handles the Life of a Page {/* #how-ionic-framework-handles-the-life-of-a-page */}
Ionic Framework has its router outlet, called ``. This outlet extends Vue Router's `` with some additional functionality to enable better experiences for mobile devices.
@@ -90,7 +90,7 @@ Because of this special handling, certain Vue Router components such as ` = [
In our redirect, we look for the index path of our app. Then if we load that, we redirect to the `home` route.
-## Navigating to Different Routes
+## Navigating to Different Routes {/* #navigating-to-different-routes */}
This is all great, but how does one actually navigate to a route? For this, we can use the `router-link` property. Let's create a new routing setup:
@@ -122,7 +122,7 @@ const router = useRouter();
Both options provide the same navigation mechanism, just fitting different use cases.
-### Navigating using `router-link`
+### Navigating using `router-link` {/* #navigating-using-router-link */}
The `router-link` attribute can be set on any Ionic Vue component, and the router will navigate to the route specified when the component is clicked. The `router-link` attribute accepts string values as well as named routes, just like `router.push` from Vue Router. For additional control, the `router-direction` and `router-animation` attributes can be set as well.
@@ -134,7 +134,7 @@ The `router-animation` attribute accepts an `AnimationBuilder` function and is u
Click Me
```
-### Navigating using `useIonRouter`
+### Navigating using `useIonRouter` {/* #navigating-using-useionrouter */}
One downside of using `router-link` is that you cannot run custom code prior to navigating. This makes tasks such as firing off a network request prior to navigation difficult. You could use Vue Router directly, but then you lose the ability to control the page transition. This is where the `useIonRouter` utility is helpful.
@@ -170,7 +170,7 @@ The example above has the app navigate to `/page2` with a custom animation that
Refer to the [useIonRouter documentation](./utility-functions#router) for more details as well as type information.
-### Navigating using `router.go`
+### Navigating using `router.go` {/* #navigating-using-routergo */}
Vue Router has a [router.go](https://router.vuejs.org/api/#go) method that allows developers to move forward or backward through the application history. Let's walk through an example.
@@ -182,7 +182,7 @@ If you were to call `router.go(-2)` on `/pageC`, you would be brought back to `/
A key characteristic of `router.go()` is that it expects your application history to be linear. This means that `router.go()` should not be used in applications that make use of non-linear routing. Refer to [Linear Routing versus Non-Linear Routing](#linear-routing-versus-non-linear-routing) for more information.
-## Lazy Loading Routes
+## Lazy Loading Routes {/* #lazy-loading-routes */}
The current way our routes are setup makes it so they are included in the same initial chunk when loading the app, which is not always ideal. Instead, we can set up our routes so that components are loaded as they are needed:
@@ -207,9 +207,9 @@ const routes: Array = [
Here, we have the same setup as before only this time `DetailPage` has been replaced with an import call. This will result in the `DetailPage` component no longer being part of the chunk that is requested on application load.
-## Linear Routing versus Non-Linear Routing
+## Linear Routing versus Non-Linear Routing {/* #linear-routing-versus-non-linear-routing */}
-### Linear Routing
+### Linear Routing {/* #linear-routing */}
If you have built a web app that uses routing, you likely have used linear routing before. Linear routing means that you can move forward or backward through the application history by pushing and popping pages.
@@ -233,7 +233,7 @@ When we press the back button, we follow that same routing path except in revers
The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.
-### Non-Linear Routing
+### Non-Linear Routing {/* #non-linear-routing */}
Non-linear routing is a concept that may be new to many web developers learning to build mobile apps with Ionic.
@@ -261,7 +261,7 @@ If tapping the back button simply called `router.go(-1)` from the `Ted Lasso` vi
Non-linear routing allows for sophisticated user flows that linear routing cannot handle. However, certain linear routing APIs such as `router.go()` cannot be used in this non-linear environment. This means that `router.go()` should not be used when using tabs or nested outlets.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose */}
We recommend keeping your application as simple as possible until you need to add non-linear routing. Non-linear routing is very powerful, but it also adds a considerable amount of complexity to mobile applications.
@@ -271,11 +271,11 @@ For more on tabs, please refer to [Working with Tabs](#working-with-tabs).
For more on nested router outlets, please refer to [Nested Routes](#nested-routes).
-## Shared URLs versus Nested Routes
+## Shared URLs versus Nested Routes {/* #shared-urls-versus-nested-routes */}
A common point of confusion when setting up routing is deciding between shared URLs or nested routes. This part of the guide will explain both and help you decide which one to use.
-### Shared URLs
+### Shared URLs {/* #shared-urls */}
Shared URLs is a route configuration where routes have pieces of the URL in common. The following is an example of a shared URL configuration:
@@ -294,7 +294,7 @@ const routes: Array = [
The above routes are considered "shared" because they reuse the `dashboard` piece of the URL.
-### Nested Routes
+### Nested Routes {/* #nested-routes */}
Nested Routes is a route configuration where routes are listed as children of other routes. The following is an example of a nested route configuration:
@@ -319,7 +319,7 @@ const routes: Array = [
The above routes are nested because they are in the `children` array of the parent route. Notice that the parent route renders the `DashboardRouterOutlet` component. When you nest routes, you need to render another instance of `ion-router-outlet`.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose-1 */}
Shared URLs are great when you want to transition from page A to page B while preserving the relationship between the two pages in the URL. In our previous example, a button on the `/dashboard` page could transition to the `/dashboard/stats` page. The relationship between the two pages is preserved because of a) the page transition and b) the url.
@@ -327,7 +327,7 @@ Nested routes should be used when you want to render content in outlet A while a
There are very few use cases in which nested routes make sense in mobile applications. When in doubt, use the shared URL route configuration. We strongly caution against using nested routing in contexts other than tabs as it can quickly make navigating your app confusing.
-## Working with Tabs
+## Working with Tabs {/* #working-with-tabs */}
When working with tabs, Ionic Vue needs a way to know which view belongs to which tab. The `IonTabs` component comes in handy here, but let's examine the routing setup for this:
@@ -399,7 +399,7 @@ import { ellipse, square, triangle } from 'ionicons/icons';
If you have worked with Ionic Framework before, this should feel familiar. We create an `ion-tabs` component and provide an `ion-tab-bar`. The `ion-tab-bar` provides `ion-tab-button` components, each with a `tab` property that is associated with its corresponding tab in the router config. We also provide an `ion-router-outlet` to give `ion-tabs` an outlet to render the different tab views in.
-### How Tabs in Ionic Work
+### How Tabs in Ionic Work {/* #how-tabs-in-ionic-work */}
Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
@@ -407,7 +407,7 @@ This behavior is important to note as it is different than most tab implementati
Since Ionic is focused on helping developers build mobile apps, the tabs in Ionic are designed to match native mobile tabs as closely as possible. As a result, there may be certain behaviors in Ionic's tabs that differ from tabs implementations in other UI libraries. Read on to learn more about some of these differences.
-### Child Routes within Tabs
+### Child Routes within Tabs {/* #child-routes-within-tabs */}
When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `/tabs/tab1/view` route as a sibling of the `/tabs/tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `ion-tab-bar`.
@@ -446,7 +446,7 @@ const routes: Array = [
];
```
-### Switching Between Tabs
+### Switching Between Tabs {/* #switching-between-tabs */}
Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
@@ -484,15 +484,15 @@ The example below shows how the Spotify app reuses the same album component to s
| :-------------------------------------------------: | :---------------------------------------------------: |
| | |
-## Components
+## Components {/* #components */}
-### IonRouterOutlet
+### IonRouterOutlet {/* #ionrouteroutlet */}
The `IonRouterOutlet` component provides a container to render your views in. It is similar to the `RouterView` component found in other Vue applications except that `IonRouterOutlet` can render multiple pages in the DOM in the same outlet. When a component is rendered in `IonRouterOutlet` we consider this to be an Ionic Framework "page". The router outlet container controls the transition animation between the pages as well as controls when a page is created and destroyed. This helps maintain the state between the views when switching back and forth between them.
Nothing should be provided inside of `IonRouterOutlet` when setting it up in your template. While `IonRouterOutlet` can be nested in child components, we caution against it as it typically makes navigation in apps confusing. Refer to [Shared URLs versus Nested Routes](#shared-urls-versus-nested-routes) for more information.
-### IonPage
+### IonPage {/* #ionpage */}
The `IonPage` component wraps each view in an Ionic Vue app and allows page transitions and stack navigation to work properly. Each view that is navigated to using the router must include an `IonPage` component.
@@ -517,9 +517,9 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
Components presented via `IonModal` or `IonPopover` do not typically need an `IonPage` component unless you need a wrapper element. In that case, we recommend using `IonPage` so that the component dimensions are still computed properly.
-## Functions
+## Functions {/* #functions */}
-### useIonRouter
+### useIonRouter {/* #useionrouter */}
▸ **useIonRouter**(): [`UseIonRouterResult`](utility-functions#useionrouterresult)
@@ -527,7 +527,7 @@ Returns the Ionic router instance, containing API methods for navigating, custom
For example usages, please refer to our [Utility Functions](utility-functions#useionrouter).
-## URL Parameters
+## URL Parameters {/* #url-parameters */}
Let's expand upon our original routing example to show how we can use URL parameters. We recommend [passing URL parameters as props](https://router.vuejs.org/guide/essentials/passing-props.html) so that the component does not need a direct reference to the router, which makes it easier to reuse and test in isolation.
@@ -577,7 +577,7 @@ defineProps<{ id: string }>();
The `id` parameter from the URL is received as a prop and rendered on the screen. The component has no dependency on the router itself.
-## Router History
+## Router History {/* #router-history */}
Vue Router ships with a configurable history mode. Let's go over the different options and why you might want to use each one.
@@ -587,6 +587,6 @@ Vue Router ships with a configurable history mode. Let's go over the different o
- `createMemoryHistory`: This option creates an in-memory based history. This is mainly used to handle server-side rendering (SSR).
-## More Information
+## More Information {/* #more-information */}
For more info on routing in Vue using Vue Router, check out the [Vue Router documentation](https://router.vuejs.org/).
diff --git a/docs/vue/overview.mdx b/docs/vue/overview.mdx
index 06bbb5624a2..f04a8cb4128 100644
--- a/docs/vue/overview.mdx
+++ b/docs/vue/overview.mdx
@@ -16,21 +16,21 @@ import DocsCards from '@components/global/DocsCards';
`@ionic/vue` brings the full power of the Ionic Framework to Vue developers. It offers seamless integration with the Vue ecosystem, so you can build high-quality cross-platform apps using familiar Vue tools, components, and best practices. You also get access to Ionic's extensive UI library and native capabilities.
-## Vue Version Support
+## Vue Version Support {/* #vue-version-support */}
Ionic Vue v9 supports Vue 3.5 and later. For detailed information on supported versions and our support policy, refer to the [Ionic Vue Support Policy](/reference/support.mdx#ionic-vue).
-## Vue Tooling
+## Vue Tooling {/* #vue-tooling */}
Ionic Vue projects use the same tooling as standard Vue CLI projects, so you can take advantage of the full Vue CLI feature set for building, testing, and deploying your apps. Starter projects come with useful features enabled by default, such as Vue Router for navigation and TypeScript support for type safety and improved developer experience.
-## Native Tooling
+## Native Tooling {/* #native-tooling */}
[Capacitor](https://capacitorjs.com) is the official cross-platform runtime for Ionic Vue, enabling your apps to run natively on iOS, Android, and the web with a single codebase.
While you can use many [Cordova](https://cordova.apache.org/) plugins with Ionic Vue, Capacitor is the recommended and fully supported solution. The [Ionic CLI](../cli.mdx) does not provide official Cordova integration for Ionic Vue projects. For more information on using Cordova plugins with Capacitor, refer to the [Capacitor documentation](https://capacitorjs.com/docs/cordova).
-## Installation
+## Installation {/* #installation */}
```shell-session
$ npm install -g @ionic/cli
@@ -40,7 +40,7 @@ $ cd myApp
$ ionic serve █
```
-## Resources
+## Resources {/* #resources */}
diff --git a/docs/vue/performance.mdx b/docs/vue/performance.mdx
index ecbc7344244..1fd79c268eb 100644
--- a/docs/vue/performance.mdx
+++ b/docs/vue/performance.mdx
@@ -5,7 +5,7 @@ sidebar_label: Performance
# Vue Performance
-## v-for with Ionic Components
+## v-for with Ionic Components {/* #v-for-with-ionic-components */}
When using `v-for` with Ionic components, we recommend using Vue's `key` attribute. This allows Vue to re-render loop elements in an efficient way by only updating the content inside of the component rather than re-creating the component altogether.
diff --git a/docs/vue/platform.mdx b/docs/vue/platform.mdx
index d1fc625812c..0b401cbce84 100644
--- a/docs/vue/platform.mdx
+++ b/docs/vue/platform.mdx
@@ -5,7 +5,7 @@ sidebar_label: Platform
# Platform
-## isPlatform
+## isPlatform {/* #isplatform */}
The `isPlatform` method can be used to test if your app is running on a certain platform:
@@ -17,7 +17,7 @@ isPlatform('ios'); // returns true when running on a iOS device
Depending on the platform the user is on, isPlatform(platformName) will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: mobile, ios, ipad, and tablet. Additionally, if the app was running from Cordova then cordova would be true.
-## getPlatforms
+## getPlatforms {/* #getplatforms */}
The `getPlatforms` method can be used to determine which platforms your app is currently running on.
@@ -29,7 +29,7 @@ getPlatforms(); // returns ["iphone", "ios", "mobile", "mobileweb"] from an iPho
Depending on what device you are on, `getPlatforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return mobile, ios, and iphone.
-## Platforms
+## Platforms {/* #platforms */}
Below is a table listing all the possible platform values along with corresponding descriptions.
@@ -50,7 +50,7 @@ Below is a table listing all the possible platform values along with correspondi
| pwa | a PWA app |
| tablet | a tablet device |
-## Customizing Platform Detection Functions
+## 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.
diff --git a/docs/vue/pwa.mdx b/docs/vue/pwa.mdx
index 5f82dc39ebf..777f79d8f9d 100644
--- a/docs/vue/pwa.mdx
+++ b/docs/vue/pwa.mdx
@@ -11,7 +11,7 @@ sidebar_label: Progressive Web Apps
/>
-## Making your Vue app a PWA with Vite
+## Making your Vue app a PWA with Vite {/* #making-your-vue-app-a-pwa-with-vite */}
The two main requirements of a PWA are a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) and a [Web Application Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/). While it's possible to add both of these to an app manually, we recommend using the [Vite PWA Plugin](https://vite-pwa-org.netlify.app/) instead.
@@ -39,7 +39,7 @@ For more information on configuring the Vite PWA Plugin, refer to the [Vite PWA
Refer to the [Vite PWA "Deploy" Guide](https://vite-pwa-org.netlify.app/deployment/) for information on how to deploy your PWA.
-## Making your Vue app a PWA with Vue CLI
+## Making your Vue app a PWA with Vue CLI {/* #making-your-vue-app-a-pwa-with-vue-cli */}
:::note
@@ -111,7 +111,7 @@ The service worker that is generated is based on [Workbox's webpack plugin](http
If you want to configure this and change the default behavior, checkout the [PWA plugin docs](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa#configuration) on GitHub.
-### Manifest
+### Manifest {/* #manifest */}
In addition to the service worker, the Vue PWA plugin also is responsible for creating a manifest file for your app as well. By default, the CLI will generate a manifest that contains the following entries.
@@ -152,11 +152,11 @@ In addition to the service worker, the Vue PWA plugin also is responsible for cr
Be sure to update the icons in `public/img/icons` to match your own brand. If you wanted to customize the theme color or name, be sure to read the [PWA plugin docs](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa#configuration) on GitHub.
-### Deploying
+### Deploying {/* #deploying */}
You can use various hosts like Firebase, Vercel, Netlify, or even Azure Static Web Apps. All will have similar setup processes that need to be completed. For this guide, Firebase will be used as the hosting example. In addition to this guide, the [Vue CLI docs](https://cli.vuejs.org/guide/deployment.html) also have a guide on how to deploy to various providers.
-#### Firebase
+#### Firebase {/* #firebase */}
Firebase hosting provides many benefits for Progressive Web Apps, including fast response times thanks to CDNs, HTTPS enabled by default, and support for [HTTP2 push](https://firebase.googleblog.com/2016/09/http2-comes-to-firebase-hosting.html).
diff --git a/docs/vue/quickstart.mdx b/docs/vue/quickstart.mdx
index 662f393d582..9be48c4edb8 100644
--- a/docs/vue/quickstart.mdx
+++ b/docs/vue/quickstart.mdx
@@ -18,7 +18,7 @@ Welcome! This guide will walk you through the basics of Ionic Vue development. Y
If you're looking for a high-level overview of what Ionic Vue is and how it fits into the Vue ecosystem, refer to the [Ionic Vue Overview](overview).
-## Prerequisites
+## Prerequisites {/* #prerequisites */}
Before you begin, make sure you have Node.js and npm installed on your machine.
You can check by running:
@@ -30,7 +30,7 @@ npm -v
If you don't have Node.js and npm, [download Node.js](https://nodejs.org/en/download) (which includes npm).
-## Create a Project with the Ionic CLI
+## Create a Project with the Ionic CLI {/* #create-a-project-with-the-ionic-cli */}
First, install the latest [Ionic CLI](../cli):
@@ -51,7 +51,7 @@ After running `ionic serve`, your project will open in the browser.

-## Explore the Project Structure
+## Explore the Project Structure {/* #explore-the-project-structure */}
Your new app's directory will look like this:
@@ -73,7 +73,7 @@ All file paths in the examples below are relative to the project root directory.
Let's walk through these files to understand the app's structure.
-## View the App Component
+## View the App Component {/* #view-the-app-component */}
The root of your app is defined in `App.vue`:
@@ -91,7 +91,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/vue';
This sets up the root of your application, using Ionic's `ion-app` and `ion-router-outlet` components. The router outlet is where your pages will be displayed.
-## View Routes
+## View Routes {/* #view-routes */}
Routes are defined in `router/index.ts`:
@@ -122,7 +122,7 @@ export default router;
When you visit the root URL (`/`), the `HomePage` component will be loaded.
-## View the Home Page
+## View the Home Page {/* #view-the-home-page */}
The Home page component, defined in `HomePage.vue`, imports the Ionic components and defines the page template:
@@ -170,7 +170,7 @@ For detailed information about Ionic layout components, refer to the [Header](/a
:::
-## Add an Ionic Component
+## 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`:
@@ -190,7 +190,7 @@ import { IonButton, IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from
```
-## Add a New Page
+## Add a New Page {/* #add-a-new-page */}
Create a new page at `NewPage.vue`:
@@ -229,7 +229,7 @@ When creating your own pages, always use `ion-page` as the root component. This
:::
-## Navigate to the New Page
+## Navigate to the New Page {/* #navigate-to-the-new-page */}
To navigate to the new page, create a route for it by first importing it at the top of `router/index.ts` after the `HomePage` import:
@@ -270,7 +270,7 @@ Navigating can also be performed programmatically using Vue Router, and routes c
:::
-## Add Icons to the New Page
+## Add Icons to the New Page {/* #add-icons-to-the-new-page */}
Ionic Vue comes with [Ionicons](https://ionic.io/ionicons/) pre-installed. You can use any icon by setting the `icon` property of the `ion-icon` component.
@@ -294,7 +294,7 @@ Note that we are passing the imported SVG reference, **not** the icon name as a
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 {/* #call-component-methods */}
Let's add a button that can scroll the content area to the bottom.
@@ -349,7 +349,7 @@ This pattern is necessary because Ionic components are built as Web Components.
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 {/* #run-on-a-device */}
Ionic's components work everywhere: on iOS, Android, and PWAs. To deploy to mobile, use [Capacitor](https://capacitorjs.com):
@@ -368,7 +368,7 @@ ionic cap open android
Refer to [Capacitor's Getting Started guide](https://capacitorjs.com/docs/getting-started/with-ionic) for more.
-## Build with TypeScript or JavaScript
+## Build with TypeScript or JavaScript {/* #build-with-typescript-or-javascript */}
Ionic Vue projects are created with TypeScript by default, but you can easily convert to JavaScript if you prefer. After generating a blank Ionic Vue app, follow these steps:
@@ -394,7 +394,7 @@ npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @ty
9. Install terser `npm i -D terser`.
-## Explore More
+## Explore More {/* #explore-more */}
This guide covered the basics of creating an Ionic Vue app, adding navigation, and introducing Capacitor for native builds. To dive deeper, check out:
diff --git a/docs/vue/slides.mdx b/docs/vue/slides.mdx
index 926a2f1215b..d1f46dc27ed 100644
--- a/docs/vue/slides.mdx
+++ b/docs/vue/slides.mdx
@@ -26,7 +26,7 @@ Using Swiper's Vue component is **not** required to use Swiper.js with Ionic Fra
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
First, update to the latest version of Ionic:
@@ -46,7 +46,7 @@ Once that is done, install the Swiper dependency in your project:
npm install swiper@latest
```
-## Swiping with Style
+## Swiping with Style {/* #swiping-with-style */}
Next, we need to import the base Swiper styles. We are also going to import the styles that Ionic provides which will let us customize the Swiper styles using the same CSS Variables that we used with `ion-slides`.
@@ -65,7 +65,7 @@ Importing `@ionic/vue/css/ionic-swiper.css` is **not** required to use Swiper.js
:::
-### Updating Selectors
+### Updating Selectors {/* #updating-selectors */}
Previously, we were able to target `ion-slides` and `ion-slide` to apply any custom styling. The contents of those style blocks remain the same, but we need to update the selectors. Below is a list of selector changes when going from `ion-slides` to Swiper Vue:
@@ -74,7 +74,7 @@ Previously, we were able to target `ion-slides` and `ion-slide` to apply any cus
| `ion-slides` | `.swiper` |
| `ion-slide` | `.swiper-slide` |
-### Pre-processors (optional)
+### Pre-processors (optional) {/* #pre-processors-optional */}
For developers using SCSS or Less styles, Swiper also provides imports for those files.
@@ -92,7 +92,7 @@ import 'swiper/scss';
import '@ionic/vue/css/ionic-swiper.css';
```
-## Using Components
+## Using Components {/* #using-components */}
Swiper exports two components: `Swiper` and `SwiperSlide`. The `Swiper` component is the equivalent of `IonSlides`, and `SwiperSlide` is the equivalent of `IonSlide`.
@@ -120,7 +120,7 @@ import '@ionic/vue/css/ionic-swiper.css';
```
-## Using Modules
+## Using Modules {/* #using-modules */}
By default, Swiper for Vue does not import any additional modules. To use modules such as Navigation or Pagination, you need to import them first.
@@ -223,7 +223,7 @@ Refer to [Swiper's Vue usage documentation](https://swiperjs.com/vue#usage) for
:::
-## The IonicSlides Module
+## The IonicSlides Module {/* #the-ionicslides-module */}
With `ion-slides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
@@ -266,7 +266,7 @@ The `IonicSlides` module must be the last module in the array. This will let it
:::
-## Properties
+## Properties {/* #properties */}
Swiper options are provided as props directly on the `` component rather than via the `options` object in `ion-slides`.
@@ -309,7 +309,7 @@ All properties available in Swiper Vue can be found in the [Swiper Vue props doc
:::
-## Events
+## Events {/* #events */}
Since the `Swiper` component is not provided by Ionic Framework, event names will not have an `ionSlide` prefix to them.
@@ -364,7 +364,7 @@ All events available in Swiper Vue can be found in the [Swiper Vue events docume
:::
-## Methods
+## Methods {/* #methods */}
Most methods have been removed in favor of accessing the `` props directly. Additionally, you no longer need to access `$el` first when calling methods.
@@ -403,7 +403,7 @@ Below is a full list of method changes when going from `ion-slides` to Swiper Vu
| `startAutoplay()` | Use the `autoplay` property instead. |
| `stopAutoplay()` | Use the `autoplay` property instead. |
-## Effects
+## Effects {/* #effects */}
If you are using effects such as Cube or Fade, you can install them just like we did with the other modules. In this example, we will use the fade effect. To start, we will import `EffectFade` from `swiper` and provide it in the `modules` array:
@@ -491,21 +491,21 @@ For more information on effects in Swiper, please refer to the [Swiper Vue effec
:::
-## Wrap Up
+## Wrap Up {/* #wrap-up */}
Now that you have Swiper installed, there is a whole set of new Swiper features for you to enjoy. We recommend starting with the [Swiper Vue Introduction](https://swiperjs.com/vue) and then referencing [the Swiper API docs](https://swiperjs.com/swiper-api).
-## FAQ
+## FAQ {/* #faq */}
-### Where can I find an example of this migration?
+### Where can I find an example of this migration? {/* #where-can-i-find-an-example-of-this-migration */}
You can find a sample app with `ion-slides` and the equivalent Swiper usage at https://github.com/ionic-team/slides-migration-samples.
-### Where can I get help with this migration?
+### Where can I get help with this migration? {/* #where-can-i-get-help-with-this-migration */}
If you are running into issues with the migration, please create a post on the [Ionic Forum](https://forum.ionicframework.com/).
-### Where do I file bug reports?
+### Where do I file bug reports? {/* #where-do-i-file-bug-reports */}
Before opening an issue, please consider creating a post on the [Swiper Discussion Board](https://github.com/nolimits4web/swiper/discussions) or the [Ionic Forum](https://forum.ionicframework.com) to check if your issue can be resolved by the community.
diff --git a/docs/vue/storage.mdx b/docs/vue/storage.mdx
index 5a0b18e959f..f75fade9a1a 100644
--- a/docs/vue/storage.mdx
+++ b/docs/vue/storage.mdx
@@ -21,18 +21,18 @@ Some storage options involve third-party plugins or products. In such cases, we
Here are some common use cases and solutions:
-## Local Application Settings and Data
+## Local Application Settings and Data {/* #local-application-settings-and-data */}
Many applications need to locally store settings as well as other lightweight key/value data. The [Capacitor Preferences](https://capacitorjs.com/docs/apis/preferences) plugin is specifically designed to handle these scenarios.
-## Relational Data Storage (Mobile Only)
+## Relational Data Storage (Mobile Only) {/* #relational-data-storage-mobile-only */}
Some applications, especially those following an offline-first methodology, may require locally storing high volumes of complex relational data. For such scenarios, a SQLite plugin may be used. The most common SQLite plugin offerings are:
- [Cordova SQLite Storage](https://github.com/storesafe/cordova-sqlite-storage) (a [convenience wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/sqlite) also exists for this plugin to aid in implementation)
- [Capacitor Community SQLite Plugin](https://github.com/capacitor-community/sqlite)
-## Non-Relational High Volume Data Storage (Mobile and Web)
+## Non-Relational High Volume Data Storage (Mobile and Web) {/* #non-relational-high-volume-data-storage-mobile-and-web */}
For applications that need to store a high volume of data as well as operate on both web and mobile, a potential solution is to create a key/value pair data storage service that uses [indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) on the web and one of the previously mentioned SQLite plugins on mobile.
@@ -42,7 +42,7 @@ Here a sample of how this can be accomplished:
- [Mobile Service](https://github.com/ionic-enterprise/tutorials-and-demos-vue/blob/main/demos/sqlcipher-kv-pair/src/composables/mobile-kv-store.ts)
- [Web Service](https://github.com/ionic-enterprise/tutorials-and-demos-vue/blob/main/demos/sqlcipher-kv-pair/src/composables/web-kv-store.ts)
-## Other Options
+## Other Options {/* #other-options */}
Other storage options that provide local as well as cloud-based storage that work well within Capacitor applications also exist and may integrate well with your application.
diff --git a/docs/vue/testing.mdx b/docs/vue/testing.mdx
index f285dce7218..25e870fc28e 100644
--- a/docs/vue/testing.mdx
+++ b/docs/vue/testing.mdx
@@ -12,9 +12,9 @@ title: Testing
This document provides an overview of how to test an application built with `@ionic/vue`. Applications generated with the Ionic CLI are set up for unit testing with [Vitest](https://vitest.dev) and [Vue Test Utils](https://test-utils.vuejs.org), and for end-to-end testing with [Cypress](https://www.cypress.io).
-## Unit Testing
+## Unit Testing {/* #unit-testing */}
-### Waiting for Components
+### Waiting for Components {/* #waiting-for-components */}
When you need to wait for an Ionic component to render before asserting against its DOM, use the `componentOnReady` helper exported from `@ionic/core`. Do not call `el.componentOnReady()` directly. `@ionic/vue` uses Stencil's custom elements build, where that method does not exist on the element. The helper waits one animation frame instead, giving the component's inner contents a chance to render.
diff --git a/docs/vue/troubleshooting.mdx b/docs/vue/troubleshooting.mdx
index 9e38bc58bb3..cfd789eb781 100644
--- a/docs/vue/troubleshooting.mdx
+++ b/docs/vue/troubleshooting.mdx
@@ -14,7 +14,7 @@ This guide covers some of the more common issues you may run into when developin
Have an issue that you think should be covered here? [Let us know!](https://github.com/ionic-team/ionic-docs/issues/new?assignees=&labels=content&template=content-issue.md&title=)
-## Failed to resolve component
+## Failed to resolve component {/* #failed-to-resolve-component */}
```shell
[Vue warn]: Failed to resolve component: ion-button
@@ -38,7 +38,7 @@ import { IonButton } from '@ionic/vue';
Prefer to register your components globally once? We have you covered. Our [Build Options Guide](/vue/build-options.mdx#global-component-registration) shows you how to register Ionic Vue components globally as well as the potential downsides to be aware of when using this approach.
-## Slot attributes are deprecated
+## Slot attributes are deprecated {/* #slot-attributes-are-deprecated */}
```shell
`slot` attributes are deprecated vue/no-deprecated-slot-attribute
@@ -60,7 +60,7 @@ If you are using VSCode and have the Vetur plugin installed, you are likely gett
To resolve this issue, you will need to turn off Vetur's template validation with `vetur.validation.template: false`. Refer to the [Vetur Linting Guide](https://vuejs.github.io/vetur/guide/linting-error.html#linting) for more information.
-## Method on component is not a function
+## Method on component is not a function {/* #method-on-component-is-not-a-function */}
In order to access a method on an Ionic Framework component in Vue, you will need to access the underlying Web Component instance first:
@@ -76,7 +76,7 @@ In other framework integrations such as Ionic React, this is not needed as any `
Refer to the [Quickstart Guide](/vue/quickstart.mdx#call-component-methods) for more information.
-## Page transitions are not working
+## Page transitions are not working {/* #page-transitions-are-not-working */}
In order for page transitions to work correctly, each page must have an `ion-page` component at the root:
@@ -99,7 +99,7 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
Refer to the [IonPage documentation](navigation.mdx#ionpage) for more information.
-## Ionic events bound in JavaScript are not firing
+## Ionic events bound in JavaScript are not firing {/* #ionic-events-bound-in-javascript-are-not-firing */}
When creating event listeners in JavaScript (i.e. `addEventListener`), event names should be written as kebab-case:
@@ -117,7 +117,7 @@ await modal.present();
This is done to align with how developers bind events in their Vue templates by using kebab-case: https://vuejs.org/guide/essentials/component-basics.html#case-insensitivity
-## Blank white screen in Capacitor native build
+## Blank white screen in Capacitor native build {/* #blank-white-screen-in-capacitor-native-build */}
If your app runs correctly in the browser but shows a blank white screen when launched in a Capacitor iOS or Android build, the most common cause is a non-default `base` in `vite.config.js` (or `publicPath` in `vue.config.js` for legacy Vue CLI projects).
diff --git a/docs/vue/utility-functions.mdx b/docs/vue/utility-functions.mdx
index 60004dfd999..6993064013d 100644
--- a/docs/vue/utility-functions.mdx
+++ b/docs/vue/utility-functions.mdx
@@ -13,17 +13,17 @@ sidebar_label: Utility Functions
Ionic Vue ships with several utility functions that you can use in your application to make certain tasks easier such as managing the on-screen keyboard and the hardware back button.
-## Router
+## Router {/* #router */}
-### Functions
+### Functions {/* #functions */}
-#### useIonRouter
+#### useIonRouter {/* #useionrouter */}
▸ **useIonRouter**(): [`UseIonRouterResult`](#useionrouterresult)
Returns the Ionic router instance, containing API methods for navigating, customizing page transitions and routing context for native features. This function can be used in combination with the [`useRouter`](https://router.vuejs.org/api/index.html#userouter) from Vue.
-##### Customizing Page Transitions
+##### Customizing Page Transitions {/* #customizing-page-transitions */}
```js
import { IonPage, useIonRouter } from '@ionic/vue';
@@ -38,7 +38,7 @@ const back = () => {
};
```
-##### Back Navigation
+##### Back Navigation {/* #back-navigation */}
You may want to know if you are at the root page of the application when a user presses the hardware back button on Android.
@@ -53,9 +53,9 @@ if (ionRouter.canGoBack()) {
For additional APIs with Vue routing, please refer to the [Vue Router documentation](https://router.vuejs.org/api/index.html).
-### Interfaces
+### Interfaces {/* #interfaces */}
-#### UseIonRouterResult
+#### UseIonRouterResult {/* #useionrouterresult */}
```ts
import { AnimationBuilder } from '@ionic/vue';
@@ -84,7 +84,7 @@ useIonRouter(): UseIonRouterResult;
Refer to the [Vue Navigation Documentation](./navigation#navigating-using-useionrouter) for more usage examples.
-## Hardware Back Button
+## Hardware Back Button {/* #hardware-back-button */}
The `useBackButton` function can be used to register a callback function to fire whenever the hardware back button on Android is pressed. Additionally it accepts a priority parameter, allowing developers to customize which handler fires first if multiple handlers are registered.
@@ -98,7 +98,7 @@ useBackButton(10, () => {
});
```
-### Interfaces
+### Interfaces {/* #interfaces-1 */}
```ts
type Handler = (processNextHandler: () => void) => Promise | void | null;
@@ -117,7 +117,7 @@ The `useBackButton` callback will only fire when your app is running in Capacito
:::
-## Keyboard
+## Keyboard {/* #keyboard */}
The `useKeyboard` function returns an object that contains the state of the on-screen keyboard. This object provides information such as whether or not the on-screen keyboard is presented and what the height of the keyboard is in pixels. This information is provided in a Vue `ref` so it will be reactive in your application.
@@ -132,7 +132,7 @@ watch(keyboardHeight, () => {
});
```
-### Interfaces
+### Interfaces {/* #interfaces-2 */}
```ts
interface UseKeyboardResult {
@@ -146,7 +146,7 @@ useKeyboard(): UseKeyboardResult;
Refer to the [Keyboard Documentation](../developing/keyboard) for more information and usage examples.
-## Ionic Lifecycles
+## Ionic Lifecycles {/* #ionic-lifecycles */}
Ionic Vue provides several lifecycle hooks for the `setup()` function to tap into the Ionic Framework page lifecycle.
diff --git a/docs/vue/virtual-scroll.mdx b/docs/vue/virtual-scroll.mdx
index e38a7a74706..1dac1b6895e 100644
--- a/docs/vue/virtual-scroll.mdx
+++ b/docs/vue/virtual-scroll.mdx
@@ -6,7 +6,7 @@
:::
-## Installation
+## Installation {/* #installation */}
To setup the virtual scroller, first install `vue-virtual-scroller`:
@@ -25,11 +25,11 @@ From here, we need to import the virtual scroller's CSS into our app. In `main.t
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
```
-## Registering Virtual Scroll Components
+## Registering Virtual Scroll Components {/* #registering-virtual-scroll-components */}
Now that we have the package installed and the CSS imported, we can either import all virtual scroll components or only import the components we want to use. This guide will show how to do both.
-### Installing all Components
+### Installing all Components {/* #installing-all-components */}
To install all virtual scroll components for use your app, add the following import to `main.ts`:
@@ -51,7 +51,7 @@ Installing all components may result in unused virtual scroll components being a
:::
-### Installing Specific Components
+### Installing Specific Components {/* #installing-specific-components */}
To install specific virtual scroll components for use in your app, import the component you want to use in `main.ts`. In this example, we will be using the `RecycleScroller` component:
@@ -67,7 +67,7 @@ app.component('RecycleScroller', RecycleScroller);
After doing this, we will be able to use the `RecycleScroller` component in our app.
-## Usage
+## Usage {/* #usage */}
This example will use the `RecycleScroller` component which only renders the visible items in your list. Other components such as `DynamicScroller` can be used when you do not know the size of the items in advance.
@@ -111,7 +111,7 @@ Now that our template is setup, we need to add some CSS to size the virtual scro
}
```
-## Usage with Ionic Components
+## Usage with Ionic Components {/* #usage-with-ionic-components */}
Ionic Framework requires that features such as collapsible large titles, `ion-infinite-scroll`, `ion-refresher`, and `ion-reorder-group` be used within an `ion-content`. To use these experiences with virtual scrolling, you must add the `.ion-content-scroll-host` class to the virtual scroll viewport.
@@ -129,6 +129,6 @@ For example:
```
-## Further Reading
+## Further Reading {/* #further-reading */}
This guide only covers a small portion of what `vue-virtual-scroller` is capable of. For more details, please refer to the [vue-virtual-scroller documentation](https://github.com/Akryum/vue-virtual-scroller/blob/next/packages/vue-virtual-scroller/README.md).
diff --git a/docs/vue/your-first-app.mdx b/docs/vue/your-first-app.mdx
index 0cc59b68e56..9bccc512350 100644
--- a/docs/vue/your-first-app.mdx
+++ b/docs/vue/your-first-app.mdx
@@ -24,7 +24,7 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-## What We'll Build
+## What We'll Build {/* #what-well-build */}
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
@@ -36,7 +36,7 @@ Highlights include:
Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-vue) referenced in this guide on GitHub.
-## Download Required Tools
+## Download Required Tools {/* #download-required-tools */}
Download and install these right away to ensure an optimal Ionic development experience:
@@ -46,7 +46,7 @@ Download and install these right away to ensure an optimal Ionic development exp
- **Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode.
- **Mac/Linux** users: virtually any terminal will work.
-## Install Ionic Tooling
+## Install Ionic Tooling {/* #install-ionic-tooling */}
Run the following in the command line terminal to install the Ionic CLI (`ionic`), `native-run`, used to run native binaries on devices and simulators/emulators, and `cordova-res`, used to generate native app icons and splash screens:
@@ -68,7 +68,7 @@ Consider setting up npm to operate globally without elevated permissions. Refer
:::
-## Create an App
+## Create an App {/* #create-an-app */}
Next, create an Ionic Vue app that uses the "Tabs" starter template and adds Capacitor for native functionality:
@@ -90,7 +90,7 @@ Next we'll need to install the necessary Capacitor plugins to make the app's nat
npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem
```
-### PWA Elements
+### 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).
@@ -128,7 +128,7 @@ router.isReady().then(() => {
That’s it! Now for the fun part - let’s run the app.
-## Run the App
+## Run the App {/* #run-the-app */}
Run this command next:
@@ -138,7 +138,7 @@ ionic serve
And voilà! Your Ionic app is now running in a web browser. Most of your app can be built and tested right in the browser, greatly increasing development and testing speed.
-## Photo Gallery
+## Photo Gallery {/* #photo-gallery */}
There are three tabs. Click on the "Tab2" tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
diff --git a/docs/vue/your-first-app/2-taking-photos.mdx b/docs/vue/your-first-app/2-taking-photos.mdx
index 051055075ce..4aafcf8da82 100644
--- a/docs/vue/your-first-app/2-taking-photos.mdx
+++ b/docs/vue/your-first-app/2-taking-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Taking Photos
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 Gallery Composable
+## Photo Gallery Composable {/* #photo-gallery-composable */}
We will create a standalone composition method paired with [Vue's Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html#why-composition-api) to manage the photos for the gallery.
@@ -89,7 +89,7 @@ _(Your selfie is probably much better than mine)_
After taking a photo, it disappears right away. We need to display it within our app and save it for future access.
-## Displaying Photos
+## Displaying Photos {/* #displaying-photos */}
To define the data structure for our photo metadata, create a new interface named `UserPhoto`. Add this interface at the very bottom of the `usePhotoGallery.ts` file, immediately after the `usePhotoGallery()` method definition.
diff --git a/docs/vue/your-first-app/3-saving-photos.mdx b/docs/vue/your-first-app/3-saving-photos.mdx
index 1d8e539c269..b8a7855d170 100644
--- a/docs/vue/your-first-app/3-saving-photos.mdx
+++ b/docs/vue/your-first-app/3-saving-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Saving Photos
We’re now able to take multiple photos and display them in a photo gallery on the second tab of our app. These photos, however, are not currently being stored permanently, so when the app is closed, they will be deleted.
-## Filesystem API
+## Filesystem API {/* #filesystem-api */}
Fortunately, saving them to the filesystem only takes a few steps. Begin by creating a new class method, `savePicture()`, in the `usePhotoGallery()` method in `usePhotoGallery.ts`.
diff --git a/docs/vue/your-first-app/4-loading-photos.mdx b/docs/vue/your-first-app/4-loading-photos.mdx
index 9884db3c6ff..42888976f13 100644
--- a/docs/vue/your-first-app/4-loading-photos.mdx
+++ b/docs/vue/your-first-app/4-loading-photos.mdx
@@ -15,7 +15,7 @@ We’ve implemented photo taking and saving to the filesystem. There’s one las
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 {/* #preferences-api */}
Open `usePhotoGallery.ts` and begin by defining a constant variable that will act as the key for the store.
diff --git a/docs/vue/your-first-app/5-adding-mobile.mdx b/docs/vue/your-first-app/5-adding-mobile.mdx
index 99c283cb9fa..ee5e2a966f3 100644
--- a/docs/vue/your-first-app/5-adding-mobile.mdx
+++ b/docs/vue/your-first-app/5-adding-mobile.mdx
@@ -13,7 +13,7 @@ strip_number_prefixes: false
Our photo gallery app won’t be complete until it runs on iOS, Android, and the web - all using one codebase. All it takes is some small logic changes to support mobile platforms, installing some native tooling, then running the app on a device. Let’s go!
-## Import Platform API
+## Import Platform API {/* #import-platform-api */}
Let’s start with making some small code changes - then our app will “just work” when we deploy it to a device.
@@ -33,7 +33,7 @@ import { isPlatform } from '@ionic/vue';
// ...existing code...
```
-## Platform-specific Logic
+## Platform-specific Logic {/* #platform-specific-logic */}
First, we’ll update the photo saving functionality to support mobile. In the `savePicture()` method, check which platform the app is running on. If it’s “hybrid” (Capacitor, the native runtime), then read the photo file into base64 format using the `Filesystem.readFile()` method. Otherwise, use the same logic as before when running the app on the web.
diff --git a/docs/vue/your-first-app/6-deploying-mobile.mdx b/docs/vue/your-first-app/6-deploying-mobile.mdx
index e5656eab56e..4128b26e3eb 100644
--- a/docs/vue/your-first-app/6-deploying-mobile.mdx
+++ b/docs/vue/your-first-app/6-deploying-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Deploying Mobile
Since we added Capacitor to our project when it was first created, there’s only a handful of steps remaining until the Photo Gallery app is on our device!
-## Capacitor Setup
+## Capacitor Setup {/* #capacitor-setup */}
Capacitor is Ionic’s official app runtime that makes it easy to deploy web apps to native platforms like iOS, Android, and more. If you’ve used Cordova in the past, consider reading more about the [differences between Capacitor and Cordova](https://capacitorjs.com/docs/cordova#differences-between-capacitor-and-cordova).
@@ -44,7 +44,7 @@ Note: After making updates to the native portion of the code (such as adding a n
ionic cap sync
```
-## iOS Deployment
+## iOS Deployment {/* #ios-deployment */}
:::important
@@ -82,7 +82,7 @@ Upon tapping the Camera button on the Photo Gallery tab, the permission prompt w

-## Android Deployment
+## Android Deployment {/* #android-deployment */}
Capacitor Android apps are configured and managed through Android Studio. Before running this app on an Android device, there's a couple of steps to complete.
diff --git a/docs/vue/your-first-app/7-live-reload.mdx b/docs/vue/your-first-app/7-live-reload.mdx
index d3448c34b2e..214a6735b2f 100644
--- a/docs/vue/your-first-app/7-live-reload.mdx
+++ b/docs/vue/your-first-app/7-live-reload.mdx
@@ -15,7 +15,7 @@ So far, we’ve learned how easy it is to develop a cross-platform app that work
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
+## Live Reload {/* #live-reload */}
Remember `ionic serve`? That was Live Reload working in the browser, allowing us to iterate quickly.
@@ -31,7 +31,7 @@ ionic cap run android -l --external
The Live Reload server will start up, and the native IDE of choice will open if not opened already. Within the IDE, click the Play button to launch the app onto your device.
-## Deleting Photos
+## Deleting Photos {/* #deleting-photos */}
With Live Reload running and the app open on your device, let’s implement photo deletion functionality.
diff --git a/docs/vue/your-first-app/8-distribute.mdx b/docs/vue/your-first-app/8-distribute.mdx
index 85361db62e6..80bfed67fe7 100644
--- a/docs/vue/your-first-app/8-distribute.mdx
+++ b/docs/vue/your-first-app/8-distribute.mdx
@@ -15,13 +15,13 @@ Now that you have built your first app, you are going to want to get it distribu
Below we will run through an overview of the steps.
-## Connect Your Repo
+## Connect Your Repo {/* #connect-your-repo */}
Appflow works directly with Git version control and uses your existing code base as the source of truth for Deploy and Package builds. You will first need to integrate with your hosting service, such as GitHub or Bitbucket, or you can push your code directly to Appflow. Once this is completed, Appflow will have access to your code.
For more on connecting your code repository to Appflow, checkout the [Connect your Repo](https://ionic.io/docs/appflow/quickstart/connect) section inside the Appflow docs.
-## Install the Appflow SDK
+## Install the Appflow SDK {/* #install-the-appflow-sdk */}
The Appflow SDK (also known as Ionic Deploy plugin) will allow you to take advantage of arguably two of the best Appflow features: deploying live updates to your app and bypassing the app stores. Ionic Appflow's Live Update feature is shipped with Appflow SDK and features the capabilities of detecting and syncing the updates for your app that you have pushed to your identified channels within the dashboard.
@@ -36,7 +36,7 @@ ionic deploy add \
For prerequisite and additional instructions on installing the Appflow SDK, visit the [Install the Appflow SDK](https://ionic.io/docs/appflow/quickstart/installation) section inside the Appflow docs.
-## Push a Commit
+## Push a Commit {/* #push-a-commit */}
In order for Appflow to access the latest and greatest changes to your code, you will need to push a commit via the version control integration of your choosing. For those that use GitHub or Bitbucket, this would look as follows:
@@ -48,7 +48,7 @@ git push origin main # push the changes from the main branch to your git host
After the push is made, your commit appears under the `Commits` tab of the Appflow Dashboard. For more information, refer to the [Push a Commit](https://ionic.io/docs/appflow/quickstart/push) section inside the Appflow docs.
-## Deploy a Live Update
+## Deploy a Live Update {/* #deploy-a-live-update */}
With the Appflow SDK installed and your commit pushed up to the Dashboard, you are ready to deploy a live update to a device. The Live Update feature uses the installed Appflow SDK with your native application to listen to a particular Deploy Channel Destination. When a live update is assigned to a Channel Destination, that update will be deployed to user devices running binaries that are configured to listen to that specific Channel Destination.
@@ -66,7 +66,7 @@ Assuming the app is configured correctly to listen to the channel you deployed t
To dive into more details on the steps to deploy a live update, as well as additional information such as disabling deploy for development, check out the [Deploy a Live Update](https://ionic.io/docs/appflow/quickstart/deploy) section inside the Appflow docs.
-## Build a Native Binary
+## Build a Native Binary {/* #build-a-native-binary */}
Next up is a native binary for your app build and deploy process. This is done via the [Ionic Package](https://ionic.io/docs/appflow/package/intro) service. First things first, you will need to create a [Package build](https://ionic.io/docs/appflow/package/builds). This can be done by clicking the `Start build` icon from the `Commits` tab or by clicking the `New build` button in the top right from the `Build > Builds` tab. Then you will select the proper commit for your build and fill in all of the several required fields and any optional fields that you want to specify. After filling in all of the information and the build begins, you can check out it's progress and review the logs if you encounter any errors.
@@ -74,19 +74,19 @@ Given a successful Package build, an iOS binary (`.ipa` or IPA) or/and an Androi
Further information regarding building native binaries can be found inside of the [Build a Native Binary](https://ionic.io/docs/appflow/quickstart/package) section inside the Appflow docs.
-## Create an Automation
+## Create an Automation {/* #create-an-automation */}
[Automations](https://ionic.io/docs/appflow/automation/intro) enable you and your team to utilize the full CI/CD powers of Appflow. You can create automations that trigger [Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) every time your team commits new code to a given branch. The automations can also be configured to use different environments and native configurations for building different versions of your app for development, staging, QA and production.
For more information, visit the [Create an Automation](https://ionic.io/docs/appflow/quickstart/automation) section within the Appflow docs. That section covers creating a single automation. However, you can create multiple automations for different branches or workflows and customize them to fit your needs. An important note is that the ability to create an automation is available for those on our [Basic plans](https://ionic.io/pricing) and above.
-## Create an Environment
+## Create an Environment {/* #create-an-environment */}
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be further customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
Creating an Environment is available for those on our [Basic plans](https://ionic.io/pricing) and above. More information on this can be found in the [Create an Environment](https://ionic.io/docs/appflow/quickstart/environment) section within the Appflow docs.
-## Create a Native Configuration
+## Create a Native Configuration {/* #create-a-native-configuration */}
[Native Configurations](https://ionic.io/docs/appflow/package/native-configs) allow you to easily modify common configuration values that can change between different environments (development, production, staging, etc.) so you do not need to use extra logic or manually commit them to version control. Native configurations can be attached to any [Package build](https://ionic.io/docs/appflow/package/intro) or [Automation](https://ionic.io/docs/appflow/automation/intro).
@@ -98,7 +98,7 @@ Native configs can be used to:
For access to the ability to create a Native Configuration, you will need to be on our [Basic plans](https://ionic.io/pricing) and above. Additional details of this feature can be found in the [Create a Native Configuration](https://ionic.io/docs/appflow/quickstart/native-config) section within the Appflow docs.
-## What’s Next?
+## What’s Next? {/* #whats-next */}
Congratulations! You developed a complete cross-platform Photo Gallery app that runs on the web, iOS, and Android. Not only that, you have also then built the app and deployed it to your users' devices!
diff --git a/docusaurus.config.js b/docusaurus.config.js
index d32ded56a8e..4a751bf38e4 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -45,7 +45,16 @@ module.exports = {
ja: { label: '日本語' },
},
},
- onBrokenLinks: 'warn',
+ /**
+ * A broken link or anchor fails the build instead of warning, so a stale
+ * cross-reference cannot reach production unnoticed.
+ *
+ * `build:preview` passes `--locale en`, so a pull request preview only
+ * ever checks English. A regression in a translated locale surfaces in
+ * the production build, which builds every locale.
+ */
+ onBrokenLinks: 'throw',
+ onBrokenAnchors: 'throw',
future: {
v4: {
/**
@@ -404,8 +413,13 @@ module.exports = {
'docusaurus-plugin-copy-page-button',
{
injectButton: false,
+ // docusaurus-plugin-llms-txt writes the markdown twins instead, reusing
+ // this package's converter after repairing the HTML it is given.
+ // Turning both on would have the two race for the same files.
+ generateMarkdownRoutes: false,
},
],
+ path.resolve(__dirname, 'plugins', 'docusaurus-plugin-llms-txt'),
],
customFields: {},
themes: [],
diff --git a/package-lock.json b/package-lock.json
index 50aaa18c9a6..1626038a551 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -12,6 +12,7 @@
"@docusaurus/core": "^3.10.2",
"@docusaurus/faster": "^3.10.2",
"@docusaurus/preset-classic": "^3.10.2",
+ "@docusaurus/utils": "^3.10.2",
"@floating-ui/react": "^0.27.20",
"@ionic-internal/ionic-ds": "^8.0.0",
"@mdx-js/react": "^3.1.1",
diff --git a/package.json b/package.json
index eeae0383899..fded68b4743 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
"deploy": "docusaurus deploy",
"docusaurus": "docusaurus",
"generate-markdown": "node scripts/native.mjs && node scripts/cli.mjs && node scripts/release-notes.mjs",
+ "heading-ids": "docusaurus write-heading-ids . \"docs/**/*.mdx\" \"!docs/native/**\" \"!docs/cli/commands/**\" --syntax mdx-comment",
"lint": "npm run prettier -- --write",
"serve": "docusaurus serve",
"playground:new": "hygen playground new",
@@ -43,6 +44,7 @@
"@docusaurus/core": "^3.10.2",
"@docusaurus/faster": "^3.10.2",
"@docusaurus/preset-classic": "^3.10.2",
+ "@docusaurus/utils": "^3.10.2",
"@floating-ui/react": "^0.27.20",
"@ionic-internal/ionic-ds": "^8.0.0",
"@mdx-js/react": "^3.1.1",
diff --git a/plugins/docusaurus-plugin-llms-txt/README.md b/plugins/docusaurus-plugin-llms-txt/README.md
new file mode 100644
index 00000000000..195a4ba6416
--- /dev/null
+++ b/plugins/docusaurus-plugin-llms-txt/README.md
@@ -0,0 +1,41 @@
+# docusaurus-plugin-llms-txt
+
+Writes `llms.txt` into the build output so it is served at https://ionicframework.com/docs/llms.txt, in the format described at [llmstxt.org](https://llmstxt.org).
+
+The plugin also writes a markdown twin of every docs page, which is what the index links to. Twins are written for every version, so a v8 page is readable as markdown too, but `llms.txt` itself covers only the current version in English.
+
+## `md` and `mdx`
+
+Authored docs stay `.mdx`, and nothing here changes that. Everything this plugin emits is plain `.md`, because it is written for agents rather than for the site: an agent fetching `/docs/api/button.md` gets markdown it can read straight off, with no JSX, no imports and no components to resolve. The `.md` files are build output only, so none of them are checked in and none of them should be edited by hand.
+
+## Serving the twins
+
+Vercel's default `Content-Disposition` on a `.md` response carries a `filename`, and some clients take that as a save hint, so an agent asking for `/docs/api/button.md` downloads the file instead of reading the body it just fetched. The `headers` block in `vercel.json` sets a bare `Content-Disposition: inline` for anything ending in `.md`, which drops the filename and leaves the markdown in the response. Nothing in the plugin depends on that header, so it is easy to lose in a `vercel.json` cleanup without anything failing.
+
+## Why the twins are written here
+
+The conversion comes from `docusaurus-plugin-copy-page-button`, which is already a dependency. Its own `generateMarkdownRoutes` option writes the same files, and is deliberately left off in `docusaurus.config.js`, because plugin `postBuild` hooks run concurrently under `Promise.all` and having both write the same paths would be a race. The converter is reused here instead, with the HTML repaired on the way through.
+
+Docusaurus emits minified HTML with the optional `` and `
` end tags left out, which that converter's parser does not account for, so every table used to collapse onto a single line. Separately, a `` mounts its editor on the client, so the server-rendered HTML is an empty shell and the code examples went missing. Those snippets are on disk under `static/usage/`, so they get read from there and spliced back in. The smaller repairs are commented in `lib/markdown-twins.js`.
+
+There's one trap if you touch the path handling. The converter also has a client-side `getMarkdownRouteUrl` that disagrees with what it writes to disk for the site root, giving `/docs.md` where the file is `/docs/index.md`. Use `lib/markdown-path.js`, which follows the file on disk, and which the theme shares so the copy page button cannot drift from the generated files.
+
+## Which pages are covered
+
+Sections mirror the top-level categories of the `docs` sidebar. The generated reference pages (the `api`, `cli` and `native` sidebars) go under `## Optional`, the spec's reserved heading for links an agent can skip when it needs a shorter context.
+
+A page is included when some sidebar points at it, which keeps unreferenced pages out of both the index and the twins without a path list to maintain. Draft and unlisted pages are dropped too.
+
+The Japanese build is skipped. It gets its own `build/ja` output root so there is no clash with the English file, but the section labels come from the English sidebar and nothing would link the result.
+
+## Descriptions
+
+Bullet descriptions come from the docs plugin's resolved `description`. Almost no page sets one in frontmatter, so in practice this is Docusaurus's body excerpt, which for most pages is the SEO title out of the in-body `` block and reads well enough. A few fall through to something useless, and `cleanDescription` drops those so the bullet ends up title-only. Setting a frontmatter `description` on a page beats the excerpt.
+
+## Layout and tests
+
+```bash
+npx vitest run plugins/docusaurus-plugin-llms-txt
+```
+
+The `index.js` hook owns the filesystem and everything under `lib/` is pure. `llms-txt.js` builds the index, `markdown-twins.js` the twins, `playground-code.js` reads a usage folder, `paths.js` maps a permalink to files on disk, and `markdown-path.js` holds the permalink-to-twin mapping that the theme shares.
diff --git a/plugins/docusaurus-plugin-llms-txt/index.js b/plugins/docusaurus-plugin-llms-txt/index.js
new file mode 100644
index 00000000000..1019e8f342c
--- /dev/null
+++ b/plugins/docusaurus-plugin-llms-txt/index.js
@@ -0,0 +1,158 @@
+const fs = require('fs');
+const path = require('path');
+
+const { buildSections, getReferencedDocIds, renderLlmsTxt } = require('./lib/llms-txt');
+const { buildTwin, hasPlaygrounds, readUsageDirs } = require('./lib/markdown-twins');
+const { toMarkdownPath, toOutputPaths } = require('./lib/paths');
+
+const DOCS_PLUGIN_NAME = 'docusaurus-plugin-content-docs';
+const DOCS_PLUGIN_ID = 'default';
+const CURRENT_VERSION = 'current';
+
+const INTRO =
+ 'Every page below links to its markdown source, and each one opens with the URL of the page it came from. ' +
+ 'These pages document the current version of Ionic Framework in English.';
+
+/** Names the other versions that also have twins, so they are discoverable. */
+const olderVersionsNote = (loadedVersions) => {
+ const paths = loadedVersions
+ .filter((version) => version.versionName !== CURRENT_VERSION)
+ .map((version) => `${version.path.replace(/\/+$/, '')}/`);
+
+ return paths.length > 0 ? ` Pages for earlier versions are at the same paths under ${paths.join(' and ')}.` : '';
+};
+
+const firstExisting = (candidates) => candidates.find((candidate) => fs.existsSync(candidate));
+const withTrailingSlash = (baseUrl) => (baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`);
+
+/**
+ * Writes an llms.txt index (https://llmstxt.org) into the build output, plus a
+ * markdown twin of every docs page for it to link to. Both land at the docs
+ * root alongside sitemap.xml. See ./README.md.
+ */
+module.exports = function llmsTxtPlugin() {
+ return {
+ name: 'docusaurus-plugin-llms-txt',
+
+ async postBuild(props) {
+ const { outDir, siteDir, i18n, plugins, siteConfig, baseUrl } = props;
+
+ /**
+ * Each locale has its own outDir, so the Japanese build would write a
+ * `build/ja/llms.txt` that nothing links to, with section labels still
+ * taken from the English sidebar.
+ */
+ if (i18n.currentLocale !== i18n.defaultLocale) {
+ return;
+ }
+
+ const docsPlugin = plugins.find(
+ (plugin) => plugin.name === DOCS_PLUGIN_NAME && (plugin.options?.id ?? DOCS_PLUGIN_ID) === DOCS_PLUGIN_ID
+ );
+
+ if (!docsPlugin?.content?.loadedVersions) {
+ console.warn('[llms-txt] docs plugin content was not available, skipping llms.txt.');
+ return;
+ }
+
+ const { loadedVersions } = docsPlugin.content;
+ const staticDir = path.join(siteDir, 'static');
+ const warn = (message) => console.warn(`[llms-txt] ${message}`);
+
+ /** A missing or renamed source costs that page its snippets, not the build. */
+ const readSource = (doc) => {
+ try {
+ return fs.readFileSync(path.join(siteDir, doc.source.replace(/^@site\//, '')), 'utf8');
+ } catch {
+ warn(`could not read ${doc.source}, leaving its playground code out.`);
+ return '';
+ }
+ };
+
+ // Twins cover every version, not just the current one.
+ const referencedByVersion = new Map(
+ loadedVersions.map((loaded) => [loaded.versionName, getReferencedDocIds(loaded.sidebars)])
+ );
+
+ /**
+ * Every page that gets a twin, so a link between two of them can be
+ * rewritten to stay inside the markdown corpus.
+ */
+ const twinUrls = new Map();
+ for (const version of loadedVersions) {
+ for (const doc of version.docs) {
+ if (!doc.draft && !doc.unlisted && referencedByVersion.get(version.versionName).has(doc.id)) {
+ twinUrls.set(doc.permalink, `${withTrailingSlash(baseUrl)}${toMarkdownPath(doc.permalink, baseUrl)}`);
+ }
+ }
+ }
+
+ let twins = 0;
+ for (const version of loadedVersions) {
+ const referencedIds = referencedByVersion.get(version.versionName);
+
+ for (const doc of version.docs) {
+ // Matching what the index lists keeps scratch and redirected pages
+ // from being published as markdown nobody can reach.
+ if (doc.draft || doc.unlisted || !referencedIds.has(doc.id)) {
+ continue;
+ }
+
+ const { htmlCandidates, markdownPath } = toOutputPaths(doc.permalink, { outDir, baseUrl });
+ const htmlPath = firstExisting(htmlCandidates);
+ if (!htmlPath) {
+ warn(`no rendered HTML for ${doc.permalink}, skipping its markdown twin.`);
+ continue;
+ }
+
+ const html = fs.readFileSync(htmlPath, 'utf8');
+ const markdown = buildTwin({
+ html,
+ pageUrl: `${siteConfig.url.replace(/\/+$/, '')}${doc.permalink}`,
+ usageDirs: hasPlaygrounds(html) ? readUsageDirs(readSource(doc)) : [],
+ staticDir,
+ twinUrls,
+ onWarn: warn,
+ });
+
+ if (markdown) {
+ fs.mkdirSync(path.dirname(markdownPath), { recursive: true });
+ fs.writeFileSync(markdownPath, markdown);
+ twins += 1;
+ }
+ }
+ }
+
+ const version = loadedVersions.find((loaded) => loaded.versionName === CURRENT_VERSION);
+ if (!version) {
+ warn(`no "${CURRENT_VERSION}" docs version found, skipping llms.txt.`);
+ return;
+ }
+
+ const referencedIds = referencedByVersion.get(CURRENT_VERSION);
+ const docsById = new Map(
+ version.docs
+ .filter((doc) => !doc.draft && !doc.unlisted && referencedIds.has(doc.id))
+ .map((doc) => [doc.id, doc])
+ );
+
+ const { sections, optional } = buildSections({ sidebars: version.sidebars, docsById });
+
+ fs.writeFileSync(
+ path.join(outDir, 'llms.txt'),
+ renderLlmsTxt({
+ title: siteConfig.title,
+ tagline: siteConfig.tagline,
+ intro: `${INTRO}${olderVersionsNote(loadedVersions)}`,
+ sections,
+ optional,
+ siteUrl: siteConfig.url,
+ baseUrl,
+ })
+ );
+
+ const linkCount = sections.reduce((total, section) => total + section.docs.length, 0) + optional.length;
+ console.log(`[llms-txt] wrote ${twins} markdown twins and llms.txt with ${linkCount} links.`);
+ },
+ };
+};
diff --git a/plugins/docusaurus-plugin-llms-txt/lib/llms-txt.js b/plugins/docusaurus-plugin-llms-txt/lib/llms-txt.js
new file mode 100644
index 00000000000..218529d0d33
--- /dev/null
+++ b/plugins/docusaurus-plugin-llms-txt/lib/llms-txt.js
@@ -0,0 +1,180 @@
+const { toMarkdownUrl } = require('./paths');
+
+/**
+ * Descriptions shorter than this are almost always a stray heading or a bare
+ * JSX tag rather than a sentence, so the bullet reads better without them.
+ */
+const MIN_DESCRIPTION_LENGTH = 15;
+
+/** Keeps a single bullet to roughly one terminal line. */
+const MAX_DESCRIPTION_LENGTH = 200;
+
+const REFERENCE_SIDEBARS = ['api', 'cli', 'native'];
+
+const normalizeWhitespace = (text) =>
+ String(text ?? '')
+ .replace(/\s+/g, ' ')
+ .trim();
+
+const forComparison = (text) =>
+ normalizeWhitespace(text)
+ .toLowerCase()
+ .replace(/[^a-z0-9]/g, '');
+
+/**
+ * Docusaurus falls back to a body excerpt when a page sets no frontmatter
+ * description, which is the usual case here. That excerpt is normally the
+ * page's SEO title and reads well, but it can land on a stray JSX tag or on a
+ * heading the title already says. Those are dropped so the bullet is
+ * title-only rather than misleading.
+ */
+function cleanDescription(description, title) {
+ const text = normalizeWhitespace(description);
+
+ if (!text) {
+ return '';
+ }
+ // Unclosed JSX or an import that the excerpt scraper did not strip.
+ if (/^[<{]/.test(text) || /^(import|export)\s/.test(text)) {
+ return '';
+ }
+ if (text.length < MIN_DESCRIPTION_LENGTH) {
+ return '';
+ }
+ // A description that just repeats the title adds nothing to the bullet.
+ // Both sides have to hold something first, or a description made purely of
+ // punctuation would match a missing title.
+ const comparableTitle = forComparison(title);
+ if (comparableTitle && forComparison(text) === comparableTitle) {
+ return '';
+ }
+
+ if (text.length <= MAX_DESCRIPTION_LENGTH) {
+ return text;
+ }
+
+ const clipped = text.slice(0, MAX_DESCRIPTION_LENGTH);
+ const lastSpace = clipped.lastIndexOf(' ');
+ return `${(lastSpace > 0 ? clipped.slice(0, lastSpace) : clipped).replace(/[.,;:]$/, '')}...`;
+}
+
+/**
+ * Visits the id of every doc a sidebar subtree points at, in sidebar order.
+ *
+ * Both `link` and `html` items are passed over. External links are not docs,
+ * and the internal ones, such as the "Responsive Grid" shortcut under Layout,
+ * point at a page that already appears under its own sidebar.
+ */
+function walkSidebarDocIds(items, visit) {
+ for (const item of items ?? []) {
+ if (item.type === 'doc' || item.type === 'ref') {
+ visit(item.id);
+ } else if (item.type === 'category') {
+ if (item.link?.type === 'doc') {
+ visit(item.link.id);
+ }
+ walkSidebarDocIds(item.items, visit);
+ }
+ }
+}
+
+/**
+ * Every doc id reachable from any sidebar. Pages outside this set are
+ * unreachable from the site navigation, which is the signal used to skip them
+ * rather than a hand-kept path list.
+ */
+function getReferencedDocIds(sidebars) {
+ const ids = new Set();
+ Object.values(sidebars ?? {}).forEach((items) => walkSidebarDocIds(items, (id) => ids.add(id)));
+ return ids;
+}
+
+/** Flattens a sidebar subtree into the docs it points at, in sidebar order. */
+function collectDocs(items, docsById) {
+ const collected = [];
+
+ walkSidebarDocIds(items, (id) => {
+ const doc = docsById.get(id);
+ if (doc) {
+ collected.push(doc);
+ }
+ });
+
+ return collected;
+}
+
+/**
+ * Splits the sidebars into the named guide sections and the single `Optional`
+ * section of generated reference pages.
+ *
+ * A doc is listed once. The guide sidebar is walked first, so a page that also
+ * appears in a reference sidebar stays with its guide.
+ */
+function buildSections({ sidebars, docsById, referenceSidebars = REFERENCE_SIDEBARS }) {
+ const seen = new Set();
+
+ const unseen = (docs) =>
+ docs.filter((doc) => {
+ if (seen.has(doc.id)) {
+ return false;
+ }
+ seen.add(doc.id);
+ return true;
+ });
+
+ const sections = (sidebars.docs ?? [])
+ .filter((item) => item.type === 'category')
+ .map((category) => ({
+ title: category.label,
+ docs: unseen(collectDocs(category.items, docsById)),
+ }))
+ .filter((section) => section.docs.length > 0);
+
+ const optional = unseen(referenceSidebars.flatMap((name) => collectDocs(sidebars[name] ?? [], docsById)));
+
+ return { sections, optional };
+}
+
+const renderBullet = (doc, urlOptions) => {
+ const url = toMarkdownUrl(doc.permalink, urlOptions);
+ const description = cleanDescription(doc.description, doc.title);
+ return description ? `- [${doc.title}](${url}): ${description}` : `- [${doc.title}](${url})`;
+};
+
+const renderSection = (title, docs, urlOptions) =>
+ [`## ${title}`, '', ...docs.map((doc) => renderBullet(doc, urlOptions)), ''].join('\n');
+
+/**
+ * Renders the llms.txt body per the format at https://llmstxt.org: an H1, a
+ * blockquote summary, free prose, then H2-delimited link lists. `Optional` is
+ * the spec's reserved heading for links an agent can skip when it needs a
+ * shorter context.
+ */
+function renderLlmsTxt({ title, tagline, intro, sections, optional, siteUrl, baseUrl }) {
+ const urlOptions = { siteUrl, baseUrl };
+
+ const parts = [`# ${title}`, ''];
+
+ if (tagline) {
+ parts.push(`> ${normalizeWhitespace(tagline)}`, '');
+ }
+ if (intro) {
+ parts.push(normalizeWhitespace(intro), '');
+ }
+
+ sections.forEach((section) => parts.push(renderSection(section.title, section.docs, urlOptions)));
+
+ if (optional.length > 0) {
+ parts.push(renderSection('Optional', optional, urlOptions));
+ }
+
+ return `${parts.join('\n').trimEnd()}\n`;
+}
+
+module.exports = {
+ buildSections,
+ cleanDescription,
+ collectDocs,
+ getReferencedDocIds,
+ renderLlmsTxt,
+};
diff --git a/plugins/docusaurus-plugin-llms-txt/lib/llms-txt.test.js b/plugins/docusaurus-plugin-llms-txt/lib/llms-txt.test.js
new file mode 100644
index 00000000000..b4fe66cc6af
--- /dev/null
+++ b/plugins/docusaurus-plugin-llms-txt/lib/llms-txt.test.js
@@ -0,0 +1,220 @@
+import { describe, expect, it } from 'vitest';
+
+import llmsTxt from './llms-txt.js';
+
+const { buildSections, cleanDescription, collectDocs, getReferencedDocIds, renderLlmsTxt } = llmsTxt;
+
+const URL_OPTIONS = { siteUrl: 'https://ionicframework.com', baseUrl: '/docs/' };
+
+const doc = (id, overrides = {}) => ({
+ id,
+ title: id,
+ description: `A sentence about ${id}.`,
+ permalink: `/docs/${id}`,
+ ...overrides,
+});
+
+const toMap = (docs) => new Map(docs.map((entry) => [entry.id, entry]));
+
+describe('cleanDescription', () => {
+ it('keeps a normal sentence and collapses whitespace', () => {
+ expect(cleanDescription(' Routing and\nredirects in Angular apps. ', 'Angular Navigation')).toBe(
+ 'Routing and redirects in Angular apps.'
+ );
+ });
+
+ it('drops JSX that leaked out of the excerpt scraper', () => {
+ expect(cleanDescription(' {
+ expect(cleanDescription('isPlatform', 'Platform')).toBe('');
+ });
+
+ it('drops a description that only repeats the title', () => {
+ expect(cleanDescription('Customizing Animations', 'Customizing Animations')).toBe('');
+ expect(cleanDescription('customizing animations!', 'Customizing Animations')).toBe('');
+ });
+
+ it('keeps a short but genuine summary', () => {
+ expect(cleanDescription('Log in to Ionic', 'ionic login')).toBe('Log in to Ionic');
+ });
+
+ it('truncates long text on a word boundary', () => {
+ const result = cleanDescription(`${'word '.repeat(80)}tail`, 'Some Page');
+
+ expect(result.endsWith('...')).toBe(true);
+ expect(result.length).toBeLessThanOrEqual(203);
+ expect(result).not.toContain('word w...');
+ });
+
+ it('returns an empty string for missing input', () => {
+ expect(cleanDescription(undefined, 'Some Page')).toBe('');
+ expect(cleanDescription('', 'Some Page')).toBe('');
+ });
+});
+
+describe('getReferencedDocIds', () => {
+ const sidebars = {
+ docs: [
+ {
+ type: 'category',
+ label: 'Getting Started',
+ link: { type: 'doc', id: 'intro/overview' },
+ items: [
+ { type: 'doc', id: 'intro/cli' },
+ {
+ type: 'category',
+ label: 'Nested',
+ items: [{ type: 'doc', id: 'intro/deep' }],
+ },
+ { type: 'link', label: 'External', href: 'https://example.com' },
+ { type: 'html', value: '' },
+ ],
+ },
+ ],
+ api: [{ type: 'category', label: 'Button', items: [{ type: 'ref', id: 'api/button' }] }],
+ };
+
+ it('collects ids from every sidebar, including nested and category links', () => {
+ expect([...getReferencedDocIds(sidebars)].sort()).toEqual([
+ 'api/button',
+ 'intro/cli',
+ 'intro/deep',
+ 'intro/overview',
+ ]);
+ });
+
+ it('leaves out a page that is present but reachable from no sidebar', () => {
+ const withOrphan = {
+ ...sidebars,
+ docs: [
+ ...sidebars.docs,
+ { type: 'html', value: '
guides/unlinked is mentioned here but no sidebar points at it
' },
+ ],
+ };
+
+ expect(getReferencedDocIds(withOrphan).has('guides/unlinked')).toBe(false);
+ });
+
+ it('handles missing sidebars without throwing', () => {
+ expect(getReferencedDocIds(undefined).size).toBe(0);
+ });
+});
+
+describe('collectDocs', () => {
+ const docsById = toMap([doc('a'), doc('b'), doc('c')]);
+
+ it('preserves sidebar order across nesting', () => {
+ const items = [
+ { type: 'doc', id: 'a' },
+ { type: 'category', label: 'Group', items: [{ type: 'doc', id: 'b' }] },
+ { type: 'doc', id: 'c' },
+ ];
+
+ expect(collectDocs(items, docsById).map((entry) => entry.id)).toEqual(['a', 'b', 'c']);
+ });
+
+ it('skips link and html items', () => {
+ const items = [
+ { type: 'link', label: 'Responsive Grid', href: '/api/grid' },
+ { type: 'html', value: '' },
+ { type: 'doc', id: 'a' },
+ ];
+
+ expect(collectDocs(items, docsById).map((entry) => entry.id)).toEqual(['a']);
+ });
+
+ it('skips ids with no matching doc', () => {
+ const items = [
+ { type: 'doc', id: 'a' },
+ { type: 'doc', id: 'missing' },
+ ];
+
+ expect(collectDocs(items, docsById).map((entry) => entry.id)).toEqual(['a']);
+ });
+});
+
+describe('buildSections', () => {
+ const docsById = toMap([doc('intro/cli'), doc('theming/basics'), doc('api/button'), doc('cli/commands/build')]);
+
+ const sidebars = {
+ docs: [
+ { type: 'category', label: 'Getting Started', items: [{ type: 'doc', id: 'intro/cli' }] },
+ { type: 'category', label: 'Theming', items: [{ type: 'doc', id: 'theming/basics' }] },
+ { type: 'category', label: 'Empty', items: [{ type: 'doc', id: 'gone' }] },
+ ],
+ api: [{ type: 'category', label: 'Button', items: [{ type: 'doc', id: 'api/button' }] }],
+ cli: [{ type: 'category', label: 'Commands', items: [{ type: 'doc', id: 'cli/commands/build' }] }],
+ native: [],
+ };
+
+ it('turns each top-level guide category into a section', () => {
+ const { sections } = buildSections({ sidebars, docsById });
+
+ expect(sections.map((section) => section.title)).toEqual(['Getting Started', 'Theming']);
+ expect(sections[0].docs.map((entry) => entry.id)).toEqual(['intro/cli']);
+ });
+
+ it('gathers the reference sidebars into the optional list', () => {
+ const { optional } = buildSections({ sidebars, docsById });
+
+ expect(optional.map((entry) => entry.id)).toEqual(['api/button', 'cli/commands/build']);
+ });
+
+ it('lists a doc once, keeping it with its guide section', () => {
+ const shared = {
+ docs: [{ type: 'category', label: 'Layout', items: [{ type: 'doc', id: 'api/button' }] }],
+ api: [{ type: 'category', label: 'Button', items: [{ type: 'doc', id: 'api/button' }] }],
+ };
+ const { sections, optional } = buildSections({ sidebars: shared, docsById });
+
+ expect(sections[0].docs.map((entry) => entry.id)).toEqual(['api/button']);
+ expect(optional).toEqual([]);
+ });
+});
+
+describe('renderLlmsTxt', () => {
+ const rendered = renderLlmsTxt({
+ title: 'Ionic Framework',
+ tagline: 'The app platform for web developers',
+ intro: 'Every page below is linked as markdown.',
+ sections: [{ title: 'Getting Started', docs: [doc('intro/cli', { title: 'Ionic CLI' })] }],
+ optional: [doc('api/button', { title: 'ion-button', description: ' {
+ expect(rendered).toBe(
+ [
+ '# Ionic Framework',
+ '',
+ '> The app platform for web developers',
+ '',
+ 'Every page below is linked as markdown.',
+ '',
+ '## Getting Started',
+ '',
+ '- [Ionic CLI](https://ionicframework.com/docs/intro/cli.md): A sentence about intro/cli.',
+ '',
+ '## Optional',
+ '',
+ '- [ion-button](https://ionicframework.com/docs/api/button.md)',
+ '',
+ ].join('\n')
+ );
+ });
+
+ it('leaves out the Optional heading when there is nothing to put under it', () => {
+ const withoutOptional = renderLlmsTxt({
+ title: 'Ionic Framework',
+ sections: [{ title: 'Getting Started', docs: [doc('intro/cli')] }],
+ optional: [],
+ ...URL_OPTIONS,
+ });
+
+ expect(withoutOptional).not.toContain('## Optional');
+ });
+});
diff --git a/plugins/docusaurus-plugin-llms-txt/lib/markdown-path.js b/plugins/docusaurus-plugin-llms-txt/lib/markdown-path.js
new file mode 100644
index 00000000000..0d1a98446a3
--- /dev/null
+++ b/plugins/docusaurus-plugin-llms-txt/lib/markdown-path.js
@@ -0,0 +1,25 @@
+// Maps a permalink to the path of its markdown twin.
+//
+// No Node imports, so the theme can pull this into the browser bundle and the
+// copy button stays in step with the files the plugin writes.
+
+const withTrailingSlash = (baseUrl) => (baseUrl.endsWith('/') ? baseUrl : `${baseUrl}/`);
+
+function stripBaseUrl(permalink, baseUrl) {
+ const base = withTrailingSlash(baseUrl);
+ const withoutBase = permalink.startsWith(base) ? permalink.slice(base.length) : permalink;
+ return withoutBase.replace(/^\/+/, '').replace(/\/+$/, '');
+}
+
+/** For example `api/button.md`. */
+function toMarkdownPath(permalink, baseUrl) {
+ const relative = stripBaseUrl(permalink, baseUrl);
+ const lastSegment = relative.slice(relative.lastIndexOf('/') + 1);
+
+ if (!relative) {
+ return 'index.md';
+ }
+ return lastSegment.includes('.') ? relative.replace(/\.[^/.]+$/, '.md') : `${relative}.md`;
+}
+
+module.exports = { stripBaseUrl, toMarkdownPath, withTrailingSlash };
diff --git a/plugins/docusaurus-plugin-llms-txt/lib/markdown-twins.js b/plugins/docusaurus-plugin-llms-txt/lib/markdown-twins.js
new file mode 100644
index 00000000000..38be7eb643e
--- /dev/null
+++ b/plugins/docusaurus-plugin-llms-txt/lib/markdown-twins.js
@@ -0,0 +1,356 @@
+const path = require('path');
+
+const { readPlaygroundCode, renderPlaygroundCode } = require('./playground-code');
+
+/**
+ * Builds the markdown twin of a rendered page, repairing the HTML on its way
+ * into docusaurus-plugin-copy-page-button's converter. See ../README.md for
+ * what needs repairing and why.
+ *
+ * Deep-importing `src/htmlToMarkdown.js` reaches past the package's documented
+ * entry point. Its `files` list ships `src` and it declares no `exports` map,
+ * so the path resolves, but it is worth re-checking on upgrade.
+ */
+const {
+ convertToMarkdown,
+ extractPageMarkdownFromHtml,
+} = require('docusaurus-plugin-copy-page-button/src/htmlToMarkdown.js');
+
+if (typeof convertToMarkdown !== 'function' || typeof extractPageMarkdownFromHtml !== 'function') {
+ throw new Error(
+ 'docusaurus-plugin-llms-txt: docusaurus-plugin-copy-page-button/src/htmlToMarkdown.js no longer exports ' +
+ 'convertToMarkdown and extractPageMarkdownFromHtml. This deep import was written against 0.8.4.'
+ );
+}
+
+const PLAYGROUND_CONTAINER = /
{/* CUSTOM CODE — "Edit this page | Copy page" as peer links on one row */}
@@ -39,6 +53,7 @@ export default function EditMetaRow({
className={clsx('col', globalStyles.noPrint, styles.editMetaActions)}>
{editUrl && }
pathname.replace(/\/+$/, '') || '/';
+
+/**
+ * Resolves the site-relative path of a page's markdown twin, or undefined when
+ * it has none. Callers decide the origin, since the copy button has to stay on
+ * the host being browsed while the canonical link tag names production.
+ *
+ * Only sidebar-reachable pages get a twin, and only in the default locale.
+ * A doc's global data already carries `sidebar` when it is reachable, so the
+ * client needs no extra data to work that out.
+ */
+export function useMarkdownTwin(): (pathname: string) => string | undefined {
+ const allDocsData = useAllDocsData();
+ const {
+ siteConfig: { baseUrl },
+ i18n: { currentLocale, defaultLocale },
+ } = useDocusaurusContext();
+
+ const permalinks = useMemo(() => {
+ const paths = new Map();
+ Object.values(allDocsData).forEach((plugin) =>
+ plugin.versions.forEach((version) =>
+ version.docs.forEach((doc) => {
+ if (doc.sidebar) {
+ paths.set(withoutTrailingSlash(doc.path), doc.path);
+ }
+ })
+ )
+ );
+ return paths;
+ }, [allDocsData]);
+
+ return (pathname: string) => {
+ if (currentLocale !== defaultLocale) {
+ return undefined;
+ }
+
+ // The home page answers on both `/docs` and `/docs/` and only the second
+ // maps to `index.md`, so go by the doc's permalink, not the address bar.
+ const permalink = permalinks.get(withoutTrailingSlash(pathname));
+ return permalink ? `${baseUrl}${toMarkdownPath(permalink, baseUrl)}` : undefined;
+ };
+}
diff --git a/static/icons/active-directory.png b/static/icons/active-directory.png
deleted file mode 100644
index a256cb1b507..00000000000
Binary files a/static/icons/active-directory.png and /dev/null differ
diff --git a/static/icons/apple-pay.png b/static/icons/apple-pay.png
deleted file mode 100644
index 4f5969be4f0..00000000000
Binary files a/static/icons/apple-pay.png and /dev/null differ
diff --git a/static/icons/apple-wallet-icon.png b/static/icons/apple-wallet-icon.png
deleted file mode 100644
index dd20a6d9193..00000000000
Binary files a/static/icons/apple-wallet-icon.png and /dev/null differ
diff --git a/static/icons/auth0.png b/static/icons/auth0.png
deleted file mode 100644
index 73e424cfe80..00000000000
Binary files a/static/icons/auth0.png and /dev/null differ
diff --git a/static/icons/aws-amplify.png b/static/icons/aws-amplify.png
deleted file mode 100644
index 04902fffcb0..00000000000
Binary files a/static/icons/aws-amplify.png and /dev/null differ
diff --git a/static/icons/couchbase.png b/static/icons/couchbase.png
deleted file mode 100644
index 8669c24e384..00000000000
Binary files a/static/icons/couchbase.png and /dev/null differ
diff --git a/static/icons/face-id.png b/static/icons/face-id.png
deleted file mode 100644
index a8f15c9876e..00000000000
Binary files a/static/icons/face-id.png and /dev/null differ
diff --git a/static/icons/facebook-icon.png b/static/icons/facebook-icon.png
deleted file mode 100644
index 31d71a9c76a..00000000000
Binary files a/static/icons/facebook-icon.png and /dev/null differ
diff --git a/static/icons/firebase.png b/static/icons/firebase.png
deleted file mode 100644
index 250c93e20d8..00000000000
Binary files a/static/icons/firebase.png and /dev/null differ
diff --git a/static/icons/instagram-icon.png b/static/icons/instagram-icon.png
deleted file mode 100644
index 41dd2600280..00000000000
Binary files a/static/icons/instagram-icon.png and /dev/null differ
diff --git a/static/icons/logo-auth-connect.png b/static/icons/logo-auth-connect.png
deleted file mode 100644
index 40299205020..00000000000
Binary files a/static/icons/logo-auth-connect.png and /dev/null differ
diff --git a/static/icons/logo-identity-vault.png b/static/icons/logo-identity-vault.png
deleted file mode 100644
index 4454669a9f1..00000000000
Binary files a/static/icons/logo-identity-vault.png and /dev/null differ
diff --git a/static/icons/logo-offline-storage.png b/static/icons/logo-offline-storage.png
deleted file mode 100644
index 40d771d6bcb..00000000000
Binary files a/static/icons/logo-offline-storage.png and /dev/null differ
diff --git a/static/icons/native-community.png b/static/icons/native-community.png
deleted file mode 100644
index d36d3648582..00000000000
Binary files a/static/icons/native-community.png and /dev/null differ
diff --git a/static/icons/native-enterprise.png b/static/icons/native-enterprise.png
deleted file mode 100644
index 2c18cf2d283..00000000000
Binary files a/static/icons/native-enterprise.png and /dev/null differ
diff --git a/static/icons/touch-id.png b/static/icons/touch-id.png
deleted file mode 100644
index 66916b36389..00000000000
Binary files a/static/icons/touch-id.png and /dev/null differ
diff --git a/static/img/android-device-skin.png b/static/img/android-device-skin.png
deleted file mode 100644
index d31f1cc511c..00000000000
Binary files a/static/img/android-device-skin.png and /dev/null differ
diff --git a/static/img/api/api-intro-header.png b/static/img/api/api-intro-header.png
deleted file mode 100755
index 18707944b6f..00000000000
Binary files a/static/img/api/api-intro-header.png and /dev/null differ
diff --git a/static/img/appstore.png b/static/img/appstore.png
deleted file mode 100755
index 25a0bfb409e..00000000000
Binary files a/static/img/appstore.png and /dev/null differ
diff --git a/static/img/guides/first-app-cap-ng/go-fast.jpg b/static/img/guides/first-app-cap-ng/go-fast.jpg
deleted file mode 100644
index 6bced60b5c7..00000000000
Binary files a/static/img/guides/first-app-cap-ng/go-fast.jpg and /dev/null differ
diff --git a/static/img/guides/first-app-v3/android-deploy.gif b/static/img/guides/first-app-v3/android-deploy.gif
deleted file mode 100755
index 699024a6001..00000000000
Binary files a/static/img/guides/first-app-v3/android-deploy.gif and /dev/null differ
diff --git a/static/img/guides/first-app-v3/app-id-location.png b/static/img/guides/first-app-v3/app-id-location.png
deleted file mode 100755
index e50b67d59d1..00000000000
Binary files a/static/img/guides/first-app-v3/app-id-location.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/appstore.png b/static/img/guides/first-app-v3/appstore.png
deleted file mode 100755
index 9b70f4fb4c9..00000000000
Binary files a/static/img/guides/first-app-v3/appstore.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/deploy-channel.png b/static/img/guides/first-app-v3/deploy-channel.png
deleted file mode 100755
index 69988fc320e..00000000000
Binary files a/static/img/guides/first-app-v3/deploy-channel.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/deploy-revertChange.png b/static/img/guides/first-app-v3/deploy-revertChange.png
deleted file mode 100755
index 4d899df32aa..00000000000
Binary files a/static/img/guides/first-app-v3/deploy-revertChange.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/email-photogallery.gif b/static/img/guides/first-app-v3/email-photogallery.gif
deleted file mode 100755
index 998ae7d1ccc..00000000000
Binary files a/static/img/guides/first-app-v3/email-photogallery.gif and /dev/null differ
diff --git a/static/img/guides/first-app-v3/gallery-combined.png b/static/img/guides/first-app-v3/gallery-combined.png
deleted file mode 100755
index 6d2ed3a9804..00000000000
Binary files a/static/img/guides/first-app-v3/gallery-combined.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/ion-lab-comparison.png b/static/img/guides/first-app-v3/ion-lab-comparison.png
deleted file mode 100755
index d3d61f7a06e..00000000000
Binary files a/static/img/guides/first-app-v3/ion-lab-comparison.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/ion-lab-md-styling.png b/static/img/guides/first-app-v3/ion-lab-md-styling.png
deleted file mode 100755
index cb86c5282d3..00000000000
Binary files a/static/img/guides/first-app-v3/ion-lab-md-styling.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/ios-install.gif b/static/img/guides/first-app-v3/ios-install.gif
deleted file mode 100755
index 04e0807159b..00000000000
Binary files a/static/img/guides/first-app-v3/ios-install.gif and /dev/null differ
diff --git a/static/img/guides/first-app-v3/monitoring-details.png b/static/img/guides/first-app-v3/monitoring-details.png
deleted file mode 100755
index ad2090d3f98..00000000000
Binary files a/static/img/guides/first-app-v3/monitoring-details.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/monitoring-event.png b/static/img/guides/first-app-v3/monitoring-event.png
deleted file mode 100755
index 757dbb7bbf4..00000000000
Binary files a/static/img/guides/first-app-v3/monitoring-event.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/playstore.png b/static/img/guides/first-app-v3/playstore.png
deleted file mode 100755
index da1a68ce1ba..00000000000
Binary files a/static/img/guides/first-app-v3/playstore.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/v3-themeColors.png b/static/img/guides/first-app-v3/v3-themeColors.png
deleted file mode 100755
index 85de462582a..00000000000
Binary files a/static/img/guides/first-app-v3/v3-themeColors.png and /dev/null differ
diff --git a/static/img/guides/first-app-v3/v3-theming.png b/static/img/guides/first-app-v3/v3-theming.png
deleted file mode 100755
index 58d8925a148..00000000000
Binary files a/static/img/guides/first-app-v3/v3-theming.png and /dev/null differ
diff --git a/static/img/guides/first-app-v4/theming-defaults.png b/static/img/guides/first-app-v4/theming-defaults.png
deleted file mode 100644
index 288ec06f053..00000000000
Binary files a/static/img/guides/first-app-v4/theming-defaults.png and /dev/null differ
diff --git a/static/img/guides/first-app-v4/theming-properties.png b/static/img/guides/first-app-v4/theming-properties.png
deleted file mode 100644
index c5eddbbb1c5..00000000000
Binary files a/static/img/guides/first-app-v4/theming-properties.png and /dev/null differ
diff --git a/static/img/guides/running/dev-app-preview.png b/static/img/guides/running/dev-app-preview.png
deleted file mode 100755
index d8479eb3c24..00000000000
Binary files a/static/img/guides/running/dev-app-preview.png and /dev/null differ
diff --git a/static/img/guides/scaffolding/generate-page-no-options.jpg b/static/img/guides/scaffolding/generate-page-no-options.jpg
deleted file mode 100755
index 1a38414e30c..00000000000
Binary files a/static/img/guides/scaffolding/generate-page-no-options.jpg and /dev/null differ
diff --git a/static/img/guides/starting/template-list.jpg b/static/img/guides/starting/template-list.jpg
deleted file mode 100755
index 117c93e53bc..00000000000
Binary files a/static/img/guides/starting/template-list.jpg and /dev/null differ
diff --git a/static/img/guides/starting/terminal-prompt2.png b/static/img/guides/starting/terminal-prompt2.png
deleted file mode 100755
index 4f620d260be..00000000000
Binary files a/static/img/guides/starting/terminal-prompt2.png and /dev/null differ
diff --git a/static/img/iphone-device-skin.png b/static/img/iphone-device-skin.png
deleted file mode 100644
index c2e48843282..00000000000
Binary files a/static/img/iphone-device-skin.png and /dev/null differ
diff --git a/static/img/meta/android-icon-144x144.png b/static/img/meta/android-icon-144x144.png
deleted file mode 100644
index f8f3f3ee4df..00000000000
Binary files a/static/img/meta/android-icon-144x144.png and /dev/null differ
diff --git a/static/img/meta/android-icon-192x192.png b/static/img/meta/android-icon-192x192.png
deleted file mode 100644
index be06211c60c..00000000000
Binary files a/static/img/meta/android-icon-192x192.png and /dev/null differ
diff --git a/static/img/meta/android-icon-36x36.png b/static/img/meta/android-icon-36x36.png
deleted file mode 100644
index 77e10c5d2b6..00000000000
Binary files a/static/img/meta/android-icon-36x36.png and /dev/null differ
diff --git a/static/img/meta/android-icon-48x48.png b/static/img/meta/android-icon-48x48.png
deleted file mode 100644
index b2c23bdb2c4..00000000000
Binary files a/static/img/meta/android-icon-48x48.png and /dev/null differ
diff --git a/static/img/meta/android-icon-72x72.png b/static/img/meta/android-icon-72x72.png
deleted file mode 100644
index 9ec050e9532..00000000000
Binary files a/static/img/meta/android-icon-72x72.png and /dev/null differ
diff --git a/static/img/meta/android-icon-96x96.png b/static/img/meta/android-icon-96x96.png
deleted file mode 100644
index 3f9f8c5e2dd..00000000000
Binary files a/static/img/meta/android-icon-96x96.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-114x114.png b/static/img/meta/apple-touch-icon-114x114.png
deleted file mode 100644
index c238ba27d5d..00000000000
Binary files a/static/img/meta/apple-touch-icon-114x114.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-120x120.png b/static/img/meta/apple-touch-icon-120x120.png
deleted file mode 100644
index 33cdf560cf3..00000000000
Binary files a/static/img/meta/apple-touch-icon-120x120.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-144x144.png b/static/img/meta/apple-touch-icon-144x144.png
deleted file mode 100644
index f55188e7aa3..00000000000
Binary files a/static/img/meta/apple-touch-icon-144x144.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-152x152.png b/static/img/meta/apple-touch-icon-152x152.png
deleted file mode 100644
index 3704e5ea53c..00000000000
Binary files a/static/img/meta/apple-touch-icon-152x152.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-180x180.png b/static/img/meta/apple-touch-icon-180x180.png
deleted file mode 100644
index 8b4ea36759a..00000000000
Binary files a/static/img/meta/apple-touch-icon-180x180.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-57x57.png b/static/img/meta/apple-touch-icon-57x57.png
deleted file mode 100644
index ec2a3be2dcb..00000000000
Binary files a/static/img/meta/apple-touch-icon-57x57.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-60x60.png b/static/img/meta/apple-touch-icon-60x60.png
deleted file mode 100644
index 67417497412..00000000000
Binary files a/static/img/meta/apple-touch-icon-60x60.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-72x72.png b/static/img/meta/apple-touch-icon-72x72.png
deleted file mode 100644
index 55457efbd96..00000000000
Binary files a/static/img/meta/apple-touch-icon-72x72.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-76x76.png b/static/img/meta/apple-touch-icon-76x76.png
deleted file mode 100644
index 6b520bd8bc7..00000000000
Binary files a/static/img/meta/apple-touch-icon-76x76.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon-precomposed.png b/static/img/meta/apple-touch-icon-precomposed.png
deleted file mode 100644
index 973557359ab..00000000000
Binary files a/static/img/meta/apple-touch-icon-precomposed.png and /dev/null differ
diff --git a/static/img/meta/apple-touch-icon.png b/static/img/meta/apple-touch-icon.png
deleted file mode 100644
index 973557359ab..00000000000
Binary files a/static/img/meta/apple-touch-icon.png and /dev/null differ
diff --git a/static/img/meta/favicon-16x16.png b/static/img/meta/favicon-16x16.png
deleted file mode 100644
index c883fde4742..00000000000
Binary files a/static/img/meta/favicon-16x16.png and /dev/null differ
diff --git a/static/img/meta/favicon-32x32.png b/static/img/meta/favicon-32x32.png
deleted file mode 100644
index 2a5cbd69bf9..00000000000
Binary files a/static/img/meta/favicon-32x32.png and /dev/null differ
diff --git a/static/img/meta/ms-icon-144x144.png b/static/img/meta/ms-icon-144x144.png
deleted file mode 100644
index f55188e7aa3..00000000000
Binary files a/static/img/meta/ms-icon-144x144.png and /dev/null differ
diff --git a/static/img/meta/ms-icon-150x150.png b/static/img/meta/ms-icon-150x150.png
deleted file mode 100644
index 6c7fec304e2..00000000000
Binary files a/static/img/meta/ms-icon-150x150.png and /dev/null differ
diff --git a/static/img/meta/ms-icon-310x310.png b/static/img/meta/ms-icon-310x310.png
deleted file mode 100644
index afdf3ff9dd1..00000000000
Binary files a/static/img/meta/ms-icon-310x310.png and /dev/null differ
diff --git a/static/img/meta/ms-icon-70x70.png b/static/img/meta/ms-icon-70x70.png
deleted file mode 100644
index 9bb74aaca72..00000000000
Binary files a/static/img/meta/ms-icon-70x70.png and /dev/null differ
diff --git a/static/img/native-platforms/platform-android-google.svg b/static/img/native-platforms/platform-android-google.svg
deleted file mode 100644
index d2ac0f478df..00000000000
--- a/static/img/native-platforms/platform-android-google.svg
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
diff --git a/static/img/native-platforms/platform-apple-ios.svg b/static/img/native-platforms/platform-apple-ios.svg
deleted file mode 100644
index bad5ee0e0e5..00000000000
--- a/static/img/native-platforms/platform-apple-ios.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
diff --git a/static/img/native-platforms/platform-electronjs-desktop.svg b/static/img/native-platforms/platform-electronjs-desktop.svg
deleted file mode 100644
index f4383c16b53..00000000000
--- a/static/img/native-platforms/platform-electronjs-desktop.svg
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
diff --git a/static/img/native-platforms/platform-pwa-progressive-web-app.svg b/static/img/native-platforms/platform-pwa-progressive-web-app.svg
deleted file mode 100644
index 3dc2224495a..00000000000
--- a/static/img/native-platforms/platform-pwa-progressive-web-app.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
diff --git a/static/img/playstore.png b/static/img/playstore.png
deleted file mode 100755
index 6218d868fb0..00000000000
Binary files a/static/img/playstore.png and /dev/null differ
diff --git a/static/img/studio/2/ss-assets.png b/static/img/studio/2/ss-assets.png
deleted file mode 100644
index 642f5c26175..00000000000
Binary files a/static/img/studio/2/ss-assets.png and /dev/null differ
diff --git a/static/img/studio/2/ss-component-index.png b/static/img/studio/2/ss-component-index.png
deleted file mode 100644
index 1bf564a5b16..00000000000
Binary files a/static/img/studio/2/ss-component-index.png and /dev/null differ
diff --git a/static/img/studio/2/ss-component-new.png b/static/img/studio/2/ss-component-new.png
deleted file mode 100644
index 5ac6a5402ca..00000000000
Binary files a/static/img/studio/2/ss-component-new.png and /dev/null differ
diff --git a/static/img/studio/2/ss-compose-reload.png b/static/img/studio/2/ss-compose-reload.png
deleted file mode 100644
index 08c580e2f60..00000000000
Binary files a/static/img/studio/2/ss-compose-reload.png and /dev/null differ
diff --git a/static/img/studio/2/ss-designer-index.png b/static/img/studio/2/ss-designer-index.png
deleted file mode 100644
index 70aee9ec981..00000000000
Binary files a/static/img/studio/2/ss-designer-index.png and /dev/null differ
diff --git a/static/img/studio/2/ss-designer.png b/static/img/studio/2/ss-designer.png
deleted file mode 100644
index af1b869c6f2..00000000000
Binary files a/static/img/studio/2/ss-designer.png and /dev/null differ
diff --git a/static/img/studio/2/ss-editor-code.png b/static/img/studio/2/ss-editor-code.png
deleted file mode 100644
index bb8f98dde15..00000000000
Binary files a/static/img/studio/2/ss-editor-code.png and /dev/null differ
diff --git a/static/img/studio/2/ss-editor-styles.png b/static/img/studio/2/ss-editor-styles.png
deleted file mode 100644
index 3a0d2742050..00000000000
Binary files a/static/img/studio/2/ss-editor-styles.png and /dev/null differ
diff --git a/static/img/studio/2/ss-editor-template.png b/static/img/studio/2/ss-editor-template.png
deleted file mode 100644
index bc02a11371b..00000000000
Binary files a/static/img/studio/2/ss-editor-template.png and /dev/null differ
diff --git a/static/img/studio/2/ss-editor-view.png b/static/img/studio/2/ss-editor-view.png
deleted file mode 100644
index b49291b068d..00000000000
Binary files a/static/img/studio/2/ss-editor-view.png and /dev/null differ
diff --git a/static/img/studio/2/ss-new-elements.png b/static/img/studio/2/ss-new-elements.png
deleted file mode 100644
index 30e1e070f08..00000000000
Binary files a/static/img/studio/2/ss-new-elements.png and /dev/null differ
diff --git a/static/img/studio/2/ss-new-feature.png b/static/img/studio/2/ss-new-feature.png
deleted file mode 100644
index f88b9e7c7a2..00000000000
Binary files a/static/img/studio/2/ss-new-feature.png and /dev/null differ
diff --git a/static/img/studio/2/ss-new-project.png b/static/img/studio/2/ss-new-project.png
deleted file mode 100644
index c53bd6a5f63..00000000000
Binary files a/static/img/studio/2/ss-new-project.png and /dev/null differ
diff --git a/static/img/studio/2/ss-properties-panel.png b/static/img/studio/2/ss-properties-panel.png
deleted file mode 100644
index 66ffecb94b3..00000000000
Binary files a/static/img/studio/2/ss-properties-panel.png and /dev/null differ
diff --git a/static/img/studio/2/ss-quick-add-element-menu.png b/static/img/studio/2/ss-quick-add-element-menu.png
deleted file mode 100644
index 78d61455d3c..00000000000
Binary files a/static/img/studio/2/ss-quick-add-element-menu.png and /dev/null differ
diff --git a/static/img/studio/2/ss-select-element-menu.png b/static/img/studio/2/ss-select-element-menu.png
deleted file mode 100644
index 9f4752f4e14..00000000000
Binary files a/static/img/studio/2/ss-select-element-menu.png and /dev/null differ
diff --git a/static/img/studio/2/ss-settings-appflow.png b/static/img/studio/2/ss-settings-appflow.png
deleted file mode 100644
index a0bfa8c3184..00000000000
Binary files a/static/img/studio/2/ss-settings-appflow.png and /dev/null differ
diff --git a/static/img/studio/2/ss-settings-platforms.png b/static/img/studio/2/ss-settings-platforms.png
deleted file mode 100644
index f52856b1982..00000000000
Binary files a/static/img/studio/2/ss-settings-platforms.png and /dev/null differ
diff --git a/static/img/studio/2/ss-settings-plugins.png b/static/img/studio/2/ss-settings-plugins.png
deleted file mode 100644
index fc5fb8f9187..00000000000
Binary files a/static/img/studio/2/ss-settings-plugins.png and /dev/null differ
diff --git a/static/img/studio/2/ss-settings-resources.png b/static/img/studio/2/ss-settings-resources.png
deleted file mode 100644
index 3b43c4ee029..00000000000
Binary files a/static/img/studio/2/ss-settings-resources.png and /dev/null differ
diff --git a/static/img/studio/2/ss-settings.png b/static/img/studio/2/ss-settings.png
deleted file mode 100644
index 82fbb1f179e..00000000000
Binary files a/static/img/studio/2/ss-settings.png and /dev/null differ
diff --git a/static/img/studio/2/ss-terminal-git.png b/static/img/studio/2/ss-terminal-git.png
deleted file mode 100644
index e3c92520073..00000000000
Binary files a/static/img/studio/2/ss-terminal-git.png and /dev/null differ
diff --git a/static/img/studio/2/ss-terminal-open.png b/static/img/studio/2/ss-terminal-open.png
deleted file mode 100644
index f19116608c0..00000000000
Binary files a/static/img/studio/2/ss-terminal-open.png and /dev/null differ
diff --git a/static/img/studio/2/ss-terminal.png b/static/img/studio/2/ss-terminal.png
deleted file mode 100644
index e16e1ca0dcb..00000000000
Binary files a/static/img/studio/2/ss-terminal.png and /dev/null differ
diff --git a/static/img/studio/2/ss-theme.png b/static/img/studio/2/ss-theme.png
deleted file mode 100644
index f0dd2213540..00000000000
Binary files a/static/img/studio/2/ss-theme.png and /dev/null differ
diff --git a/static/img/studio/2/ss-tree-select.png b/static/img/studio/2/ss-tree-select.png
deleted file mode 100644
index c6a0c9bc188..00000000000
Binary files a/static/img/studio/2/ss-tree-select.png and /dev/null differ
diff --git a/static/img/studio/ss-add-element-menu.png b/static/img/studio/ss-add-element-menu.png
deleted file mode 100644
index c38a56e4572..00000000000
Binary files a/static/img/studio/ss-add-element-menu.png and /dev/null differ
diff --git a/static/img/studio/ss-assets-window.png b/static/img/studio/ss-assets-window.png
deleted file mode 100644
index 037629bf5e0..00000000000
Binary files a/static/img/studio/ss-assets-window.png and /dev/null differ
diff --git a/static/img/studio/ss-assets.png b/static/img/studio/ss-assets.png
deleted file mode 100644
index 382562e35ca..00000000000
Binary files a/static/img/studio/ss-assets.png and /dev/null differ
diff --git a/static/img/studio/ss-canvas-reload.png b/static/img/studio/ss-canvas-reload.png
deleted file mode 100644
index 6d5ec9c35c1..00000000000
Binary files a/static/img/studio/ss-canvas-reload.png and /dev/null differ
diff --git a/static/img/studio/ss-code.png b/static/img/studio/ss-code.png
deleted file mode 100644
index 2a77027daae..00000000000
Binary files a/static/img/studio/ss-code.png and /dev/null differ
diff --git a/static/img/studio/ss-color-generator.png b/static/img/studio/ss-color-generator.png
deleted file mode 100644
index 513129c2e5c..00000000000
Binary files a/static/img/studio/ss-color-generator.png and /dev/null differ
diff --git a/static/img/studio/ss-component-index.png b/static/img/studio/ss-component-index.png
deleted file mode 100644
index 0fc7384de4d..00000000000
Binary files a/static/img/studio/ss-component-index.png and /dev/null differ
diff --git a/static/img/studio/ss-compose-scripts.png b/static/img/studio/ss-compose-scripts.png
deleted file mode 100644
index ab6ff43d50d..00000000000
Binary files a/static/img/studio/ss-compose-scripts.png and /dev/null differ
diff --git a/static/img/studio/ss-compose-styles.png b/static/img/studio/ss-compose-styles.png
deleted file mode 100644
index b5ed30707ef..00000000000
Binary files a/static/img/studio/ss-compose-styles.png and /dev/null differ
diff --git a/static/img/studio/ss-compose-template.png b/static/img/studio/ss-compose-template.png
deleted file mode 100644
index 4a3f7fec2ab..00000000000
Binary files a/static/img/studio/ss-compose-template.png and /dev/null differ
diff --git a/static/img/studio/ss-compose.png b/static/img/studio/ss-compose.png
deleted file mode 100644
index 4a3f7fec2ab..00000000000
Binary files a/static/img/studio/ss-compose.png and /dev/null differ
diff --git a/static/img/studio/ss-devtools.png b/static/img/studio/ss-devtools.png
deleted file mode 100644
index 317dd9d998b..00000000000
Binary files a/static/img/studio/ss-devtools.png and /dev/null differ
diff --git a/static/img/studio/ss-element-tree.png b/static/img/studio/ss-element-tree.png
deleted file mode 100644
index 726d54756de..00000000000
Binary files a/static/img/studio/ss-element-tree.png and /dev/null differ
diff --git a/static/img/studio/ss-install-plugin-modal.png b/static/img/studio/ss-install-plugin-modal.png
deleted file mode 100644
index 887a72d5fee..00000000000
Binary files a/static/img/studio/ss-install-plugin-modal.png and /dev/null differ
diff --git a/static/img/studio/ss-my-custom-thing-ngmodule.png b/static/img/studio/ss-my-custom-thing-ngmodule.png
deleted file mode 100644
index cb59010dedd..00000000000
Binary files a/static/img/studio/ss-my-custom-thing-ngmodule.png and /dev/null differ
diff --git a/static/img/studio/ss-new-component-modal.png b/static/img/studio/ss-new-component-modal.png
deleted file mode 100644
index 3b64b88f2f2..00000000000
Binary files a/static/img/studio/ss-new-component-modal.png and /dev/null differ
diff --git a/static/img/studio/ss-new-feature-button.png b/static/img/studio/ss-new-feature-button.png
deleted file mode 100644
index 8d81ea6d26c..00000000000
Binary files a/static/img/studio/ss-new-feature-button.png and /dev/null differ
diff --git a/static/img/studio/ss-new-project.png b/static/img/studio/ss-new-project.png
deleted file mode 100644
index 877894e13a0..00000000000
Binary files a/static/img/studio/ss-new-project.png and /dev/null differ
diff --git a/static/img/studio/ss-new-terminal.png b/static/img/studio/ss-new-terminal.png
deleted file mode 100644
index 3c36343b0f6..00000000000
Binary files a/static/img/studio/ss-new-terminal.png and /dev/null differ
diff --git a/static/img/studio/ss-page-index.png b/static/img/studio/ss-page-index.png
deleted file mode 100644
index c638267bc7c..00000000000
Binary files a/static/img/studio/ss-page-index.png and /dev/null differ
diff --git a/static/img/studio/ss-page-routing-module.png b/static/img/studio/ss-page-routing-module.png
deleted file mode 100644
index 1628122d6e8..00000000000
Binary files a/static/img/studio/ss-page-routing-module.png and /dev/null differ
diff --git a/static/img/studio/ss-properties-panel.png b/static/img/studio/ss-properties-panel.png
deleted file mode 100644
index 6c1dc0be4fd..00000000000
Binary files a/static/img/studio/ss-properties-panel.png and /dev/null differ
diff --git a/static/img/studio/ss-quick-add-element-menu.png b/static/img/studio/ss-quick-add-element-menu.png
deleted file mode 100644
index 78d61455d3c..00000000000
Binary files a/static/img/studio/ss-quick-add-element-menu.png and /dev/null differ
diff --git a/static/img/studio/ss-run-menu.png b/static/img/studio/ss-run-menu.png
deleted file mode 100644
index cbc0939c65b..00000000000
Binary files a/static/img/studio/ss-run-menu.png and /dev/null differ
diff --git a/static/img/studio/ss-run-modal.png b/static/img/studio/ss-run-modal.png
deleted file mode 100644
index a54be1a88a6..00000000000
Binary files a/static/img/studio/ss-run-modal.png and /dev/null differ
diff --git a/static/img/studio/ss-search-and-replace.png b/static/img/studio/ss-search-and-replace.png
deleted file mode 100644
index 0610e1c1998..00000000000
Binary files a/static/img/studio/ss-search-and-replace.png and /dev/null differ
diff --git a/static/img/studio/ss-search-bar.png b/static/img/studio/ss-search-bar.png
deleted file mode 100644
index 2d6e29a81cf..00000000000
Binary files a/static/img/studio/ss-search-bar.png and /dev/null differ
diff --git a/static/img/studio/ss-select-element-menu.png b/static/img/studio/ss-select-element-menu.png
deleted file mode 100644
index 9f4752f4e14..00000000000
Binary files a/static/img/studio/ss-select-element-menu.png and /dev/null differ
diff --git a/static/img/studio/ss-serve-window.png b/static/img/studio/ss-serve-window.png
deleted file mode 100644
index fe1179f46a3..00000000000
Binary files a/static/img/studio/ss-serve-window.png and /dev/null differ
diff --git a/static/img/studio/ss-settings-app-resources.png b/static/img/studio/ss-settings-app-resources.png
deleted file mode 100644
index 8a330279233..00000000000
Binary files a/static/img/studio/ss-settings-app-resources.png and /dev/null differ
diff --git a/static/img/studio/ss-settings-config.png b/static/img/studio/ss-settings-config.png
deleted file mode 100644
index f7e65c251ed..00000000000
Binary files a/static/img/studio/ss-settings-config.png and /dev/null differ
diff --git a/static/img/studio/ss-settings-platforms.png b/static/img/studio/ss-settings-platforms.png
deleted file mode 100644
index 1fe941ad001..00000000000
Binary files a/static/img/studio/ss-settings-platforms.png and /dev/null differ
diff --git a/static/img/studio/ss-settings-plugins.png b/static/img/studio/ss-settings-plugins.png
deleted file mode 100644
index ab29b436346..00000000000
Binary files a/static/img/studio/ss-settings-plugins.png and /dev/null differ
diff --git a/static/img/studio/ss-support-modal.png b/static/img/studio/ss-support-modal.png
deleted file mode 100644
index 2ff53da7862..00000000000
Binary files a/static/img/studio/ss-support-modal.png and /dev/null differ
diff --git a/static/img/studio/ss-terminal-with-git.png b/static/img/studio/ss-terminal-with-git.png
deleted file mode 100644
index 44217851b11..00000000000
Binary files a/static/img/studio/ss-terminal-with-git.png and /dev/null differ
diff --git a/static/img/studio/ss-variables-file.png b/static/img/studio/ss-variables-file.png
deleted file mode 100644
index 58b2f83cfb5..00000000000
Binary files a/static/img/studio/ss-variables-file.png and /dev/null differ
diff --git a/vercel.json b/vercel.json
index a6cebcf3432..135fa327554 100644
--- a/vercel.json
+++ b/vercel.json
@@ -47,7 +47,7 @@
},
{ "source": "/docs/ja/v9/:match*", "destination": "/docs/ja/:match*" },
{
- "source": "/docs/(v[0-9]+|next)?/developer-resources/:path*",
+ "source": "/docs/(ja)?/(v[0-9]+|next)?/developer-resources/:path*",
"destination": "https://ionic.io/resources"
},
{ "source": "/docs/next/:match*", "destination": "/docs/:match*" },
@@ -111,5 +111,11 @@
"rewrites": [
{ "source": "/docs", "destination": "/" },
{ "source": "/docs/:match*", "destination": "/:match*" }
+ ],
+ "headers": [
+ {
+ "source": "/(.*).md",
+ "headers": [{ "key": "Content-Disposition", "value": "inline" }]
+ }
]
}
diff --git a/versioned_docs/version-v5/angular/your-first-app.mdx b/versioned_docs/version-v5/angular/your-first-app.mdx
index e86420b90dc..fc15bb95dbc 100644
--- a/versioned_docs/version-v5/angular/your-first-app.mdx
+++ b/versioned_docs/version-v5/angular/your-first-app.mdx
@@ -17,10 +17,6 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-:::note
-Looking for the previous version of this guide that covered Ionic 4 and Cordova? [See here.](../developer-resources/guides/first-app-v4/intro.mdx)
-:::
-
## What We'll Build
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
diff --git a/versioned_docs/version-v5/developer-resources/books.mdx b/versioned_docs/version-v5/developer-resources/books.mdx
deleted file mode 100644
index e3eae671a5a..00000000000
--- a/versioned_docs/version-v5/developer-resources/books.mdx
+++ /dev/null
@@ -1,75 +0,0 @@
-# Books
-
-### [Learn Ionic 4 From Scratch](https://leanpub.com/learnionic4fromscratch)
-
-Angular. Vue. React. Vanilla JavaScript. All of these tools can be used to create awesome applications with Ionic, thanks to the new Stencil compiler. This book is aimed at beginners that are looking to create amazing web, mobile and desktop applications using Ionic with examples across all of the popular frameworks.
-
-{/* cspell:disable-next-line */}
-
-by [Paul Halliday](https://developer.school)
-
-### [Creating Ionic Applications with StencilJS](https://www.joshmorony.com/creating-ionic-applications-with-stencil-js/) - [Free Preview](https://cdn2.hubspot.net/hubfs/3776657/PREVIEW-Creating-Ionic-Apps-with-StencilJS.pdf)
-
-As well as being a powerful tool for generating reuseable web components, StencilJS provides the tools needed to build an entire application out of web components. Combined with the Ionic web components, StencilJS gives us everything we need to build high-quality production mobile applications - no framework required.
-
-{/* cspell:disable-next-line */}
-
-by [Joshua Morony](https://www.joshmorony.com/blog)
-
-### [Mobile App Development with Ionic: Cross-Platform Apps with Ionic 2, Angular 2, and Cordova](https://www.amazon.com/Mobile-App-Development-Ionic-Cross-Platform/dp/1491937785/ref=sr_1_2?ie=UTF8&qid=1464183332&sr=8-2&keywords=ionic+2)
-
-{/* cspell:disable-next-line */}
-
-by Chris Griffith
-
-### [Building Mobile Apps with Ionic & Angular](https://www.joshmorony.com/building-mobile-apps-with-ionic-2/)
-
-{/* cspell:disable-next-line */}
-
-by [Joshua Morony](https://www.joshmorony.com/blog)
-
-Building Mobile Apps with Ionic & Angular is an all-in-one resource for learning the latest and greatest version of Ionic. It is targeted at beginners and works its way through the basics of Ionic, to example applications of varying complexity, and then to the steps required to build and publish your application (on the app stores or as a PWA). It has been updated for every major release, so you can rest easy knowing that you're not learning outdated tech.
-
-### [Ionic 2 From Zero to App Store](https://devdactic.com/zero-to-app)
-
-{/* cspell:disable-next-line */}
-
-by Simon Reimler
-
-### [Ionic Framework By Example](https://www.packtpub.com/application-development/ionic-framework-example)
-
-{/* cspell:disable-next-line */}
-
-by Sani Yusuf
-
-### [Building Firestore Powered Ionic Apps](https://javebratt.com/ionic-firebase-book/)
-
-{/* cspell:disable-next-line */}
-
-by Jorge Vergara
-
-This book will help you go from not knowing what Firebase is to be able to use the different APIs for your Ionic Applications. It will take you from “_What’s Firebase?_” to building scalable, production-ready apps and it’s always up-to-date with latest Ionic and Firebase versions.
-
-### [Ionic 2 Cookbook - Second Edition](https://www.amazon.com/Ionic-Cookbook-Second-Hoc-Phan-ebook/dp/B01C4D9VWS?ie=UTF8&keywords=ionic%202&qid=1464183332&ref_=sr_1_3&sr=8-3)
-
-{/* cspell:disable-next-line */}
-
-by Hoc Phan
-
-### [Mastering Ionic 2](https://www.leanpub.com/masteringionic2)
-
-{/* cspell:disable-next-line */}
-
-by James Griffiths
-
-### [Learning Ionic](https://www.packtpub.com/in/application-development/learning-ionic) (Ionic 1)
-
-{/* cspell:disable-next-line */}
-
-by Arvind Ravulavaru
-
-### [Learning Ionic - Second Edition](https://www.packtpub.com/in/web-development/learning-ionic-second-edition) (Ionic 2/3)
-
-{/* cspell:disable-next-line */}
-
-by Arvind Ravulavaru
diff --git a/versioned_docs/version-v5/developer-resources/courses.mdx b/versioned_docs/version-v5/developer-resources/courses.mdx
deleted file mode 100644
index 568f0fc05a4..00000000000
--- a/versioned_docs/version-v5/developer-resources/courses.mdx
+++ /dev/null
@@ -1,107 +0,0 @@
-# Courses
-
-### [Elite Ionic](https://www.joshmorony.com/elite/)
-
-{/* cspell:disable-next-line */}
-
-by Josh Morony
-
-Elite Ionic is an online course for Ionic developers who want to move past the basics, and build complex, well tested, high performing, beautiful, and useable mobile applications. It is recommended that you already have a reasonably solid understanding of the basics of Ionic before starting this course.
-
-### [Ionic Academy](https://ionicacademy.com/)
-
-{/* cspell:disable-next-line */}
-
-by Simon Grimm
-
-Learn Ionic with step-by-step video courses & quick wins from one of the Ionic community leaders. Covers beginner, intermediate and advanced topics. Get access to a community of developers just like you.
-
-### [Ionic Framework: Tips, Tricks & Techniques](https://www.packtpub.com/mobile/ionic-framework-tips-tricks-and-techniques-video)
-
-{/* cspell:disable-next-line */}
-
-by Charles Muzonzini
-
-In this course, you will master tips and best practices for Ionic 4 & Ionic 5 that you can immediately implement to build high quality apps. This course covers a wide variety of topics from increasing app performance, to building custom native plugins, to securing your apps. It's a practical, hands-on course that will take your app building skills to the next level.
-
-### [Building Desktop Apps with Ionic and Electron](https://pluralsight.pxf.io/VeMXO)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Desktop development has historically required dramatically different skills than those required for web
-development. The two disciplines don't mesh well. In this course, Building Desktop Apps with Ionic and Electron,
-you will gain the ability to apply your hard-earned web development skills to build amazing desktop
-applications. First, you will learn how to build a functional and attractive UI with Ionic and Angular. Next,
-you will discover how to wrap that UI into an Electron application shell. Finally, you will explore how to
-package your app and make it ready for distribution. When you are finished with this course, you will have the
-skills and knowledge of Ionic and Electron development needed to deploy and distribute a beautiful app to both
-Windows and macOS users.
-
-### [Building Progressive Web Apps with Ionic](https://pluralsight.pxf.io/Ly2EY)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Everything changed when Google created the concept of Progressive Web Applications or PWA. A PWA is a pure web
-application that you can install on devices, that can function with limited network functionality, through its
-use of intelligent caching. Build a Progressive Web App that will run anywhere. In this course, Building
-Progressive Web Apps with Ionic, you will learn foundational knowledge and gain the ability to create a web
-application that will run anywhere: the browser, desktop, or mobile clients. First, you will learn what a
-Progressive Web App (or PWA) is. Next, you will discover how to use the Ionic Framework, Angular, and Firebase
-to create, deploy, and optimize a basic web application into a full-blown PWA. Finally, you will explore how to
-configure the application to make it installable and runnable on Androids and iPhones. When you’re finished with
-this course, you will have the skills and knowledge of Ionic and PWAs needed to create and deploy your own
-Progressive Web Application anywhere you desire.
-
-### [Ionic CLI](https://pluralsight.pxf.io/ionic-cli)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Since its inception, the Ionic Framework has included a rudimentary command line interface. Though only a few
-years old, it has matured into a powerful tool that should be part of every developer’s toolbox. This course,
-Ionic CLI, will start at the top and explore the Ionic CLI. First, you'll see how to create projects and
-components. Next, you will learn how to build and serve apps. Finally, you'll discover how to share projects
-with others, and even integrate with other build tools. Whether you’re just starting to explore Ionic, or have
-been using it since its pre-beta days, there is something here for you. By the end of the course, you’ll have
-the confidence to use the Ionic CLI as part of your everyday Ionic development.
-
-### [Wordpress Rest API and Ionic 4 (Angular) App With Auth](https://www.udemy.com/course/wordpress-rest-api-and-ionic-3-crud/)
-
-{/* cspell:disable-next-line */}
-
-by Baljeet Singh at Udemy
-
-### [Building Mobile Apps with Ionic 2, Angular 2, and TypeScript](https://app.pluralsight.com/library/courses/ionic2-angular2-typescript-mobile-apps/table-of-contents)
-
-{/* cspell:disable-next-line */}
-
-by Pluralsight
-
-### [Introducing Ionic 2](http://shop.oreilly.com/product/0636920050353.do)
-
-{/* cspell:disable-next-line */}
-
-by Mathieu Chauvinc
-
-### [Ionic 2 Master Course](https://www.udemy.com/ionic-2-tutorial/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Introducing Ionic 2](https://www.udemy.com/introducing-ionic-2/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Ionic 2 Solutions](https://www.packtpub.com/web-development/ionic-2-solutions-video)
-
-{/* cspell:disable-next-line */}
-
-by Hoc Phan
diff --git a/versioned_docs/version-v5/developer-resources/guides.mdx b/versioned_docs/version-v5/developer-resources/guides.mdx
deleted file mode 100644
index c0590b83684..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
-# Guides
-
-### [Your First Ionic App - v3](guides/first-app-v3/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v3 and Appflow.
-
-### [Your First Ionic 4 App - Angular and Cordova](guides/first-app-v4/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v4 and Cordova.
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 7887f03a320..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,195 +0,0 @@
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the About page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this in [the part 2 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part2) on GitHub.
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g provider PhotoProvider
-```
-
-This creates a PhotoProvider class in a dedicated providers/photo folder:
-
-```Javascript
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-
-/*
- Generated class for the PhotoProvider provider.
-
- See https://angular.io/guide/dependency-injection for more info on providers
- and Angular DI.
-*/
-@Injectable()
-export class PhotoProvider {
-
- constructor(public http: HttpClient) {
- console.log('Hello PhotoProvider Provider');
- }
-}
-```
-
-Within this class, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoProvider {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `about.ts`, import PhotoProvider:
-
-```Javascript
-import { PhotoProvider } from '../../providers/photo/photo';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoProvider) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera import, and the About page constructor. Also, remove references to HttpClient - we won’t be making any HTTP calls.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `about.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class AboutPage {
- constructor(public navCtrl: NavController, public photoService: PhotoProvider) { }
-}
-```
-
-Next, in `about.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (“col-6”), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoProvider’s `takePicture` method:
-
-```Html
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the Ionic Storage plugin, as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp),
- IonicStorageModule.forRoot()
- ],
-```
-
-It’s now ready to be used in our PhotoProvider class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
- }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
- });
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
- }
-```
-
-Over in the About page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the About page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “implemented photo gallery”
-git push ionic master
-```
-
-Next up, we’ll look at how to apply a custom theme to an Ionic app.
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/intro.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v3/intro.mdx
deleted file mode 100644
index 201a4f6c981..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/intro.mdx
+++ /dev/null
@@ -1,117 +0,0 @@
-# Your First Ionic App - Framework v3
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Reference code for this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/).
-
-## Install Node.js
-
-If you don’t have Node.js installed already, [download the LTS version](https://nodejs.org/en/).
-
-## Install Ionic
-
-Run the following in the command line (you may need to prepend “sudo” on a Mac):
-
-```shell
-npm install -g @ionic/cli
-```
-
-## Create an App
-
-Next, create an Ionic app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-“Would you like to integrate your new app with Cordova to target native iOS and Android?”
-
-Type “y” and press Enter. Project setup may take a few moments.
-
-“Install the free Appflow SDK and connect your app?”
-
-Type “y” and press Enter. [Appflow](https://ionicframework.com/pro) is a powerful set of services and features built on top of the flagship Ionic Framework. This includes updating your app instantly (skipping the app store review process!), packaging apps in the cloud, and error monitoring.
-
-Log into your Ionic Account
-
-Sign in now to easily access awesome features like Live Deploys later in this tutorial.
-
-What would you like to do?
-
-Choose “Create a new app on Appflow.”
-
-Which git host would you like to use?
-
-Choose “Appflow.”
-
-“How would you like to connect to Appflow?”
-
-- Choose “Automatically setup a new SSH key pair for Appflow” if you haven’t used SSH before.
-- Choose “Use an existing SSH key pair” if you’ve used SSH before.
-
-Next, change into the app folder, then push your code to Appflow:
-
-```shell
-$ cd photo-gallery
-$ git push ionic master
-```
-
-That’s it! Now for the fun part - let’s see it in action.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs: “Home”, “About”, and “Contact.” Click on the About tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform the About page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/pages/about/about.html`. We see:
-
-```html
-
-
- About
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with “About” as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the About page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/pages/tabs/tabs.html`. Change the tabTitle to “Gallery” and the tabIcon to “images”:
-
-```html
-
-
-
-
-
-```
-
-Now, back up your changes to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “converting about page to photo gallery”
-$ git push ionic master
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to iOS and Android, then continue building the photo gallery.
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/ios-android-camera.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v3/ios-android-camera.mdx
deleted file mode 100644
index ff861040e51..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/ios-android-camera.mdx
+++ /dev/null
@@ -1,156 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature. Fortunately, Ionic provides a way to skip the frustration of dealing with native SDK installations: Ionic DevApp!
-
-The Ionic DevApp is a free app that makes it easy to run your Ionic app directly on your iOS or Android device. Download it here, then open on your device:
-
-
-
-
-
-
-
-
-Afterwards, open a terminal and navigate to your Ionic project. Execute the following:
-
-```shell
-ionic serve -c
-```
-
-In DevApp, you should now see the app appear. If it doesn't, or you have any issues throughout creating this app, [see here](https://ionicframework.com/docs/pro/devapp/).
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this in [the “part 1” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part1) on GitHub.
-
-Back in `about.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install --save @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added:
-
-`"@awesome-cordova-plugins/camera": "^4.12.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device:
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-In `config.xml`, a new plugin entry is created:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this to the bottom of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the About page
-
-Our camera button doesn’t do anything yet. Over in `about.html`, add a click handler to the button:
-
-```html
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `about.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class AboutPage {
- currentImage: any;
-
- constructor(public navCtrl: NavController, private camera: Camera) {
-}
-```
-
-Finally, add the “takePicture” method, already wired up to execute once the camera button has been tapped:
-
-```Javascript
-takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- }
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere `:)`
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “added camera functionality”
-git push ionic master
-```
-
-Next, we’ll look at how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
deleted file mode 100644
index 30049b7017e..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
+++ /dev/null
@@ -1,193 +0,0 @@
-# Realtime App Updates with Appflow Live Updates
-
-As you’ve seen so far, building web and mobile apps is quick and easy with the Ionic Framework. However, nothing disrupts rapid iteration faster than App Store delays. Fortunately, with Appflow’s Deploy feature, you can send live code changes directly to your users. Paired with seamless background updates, they are always upgraded to the latest version.
-
-Setting it up is quick and easy. For reference, continue to refer to [the part 3 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub. First, install the Appflow JavaScript library:
-
-```shell
-npm install @ionic/pro@latest --save
-```
-
-Then, add the Appflow plugin. Here’s the command to install it:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=YOUR_APP_ID --variable CHANNEL_NAME=YOUR_CHANNEL_NAME
-```
-
-There are two unique values to provide: your app id and channel name. Sign into Appflow, then find the App Id on your app’s dashboard:
-
-
-
-And we’ll just use “Master” as the channel name. Putting this together looks like:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=381533B9 --variable CHANNEL_NAME=Master
-```
-
-After this plugin has been added, you’ll notice that `config.xml` and `package.json` have been updated with your app’s details:
-
-```xml
-
-
-
-
-
-
-
-
-
-```
-
-Next, modify `src/app/app.module.ts` to include the initialization of Appflow on app startup:
-
-```javascript
-import { Pro } from '@ionic/pro';
-
-Pro.init('YOUR_APP_ID', {
- appVersion: 'APP_VERSION',
-});
-```
-
-As an example, this would look like:
-
-```javascript
-Pro.init('381533B9', {
- appVersion: '0.0.1',
-});
-```
-
-Next, push the code up to Appflow:
-
-```shell
-git add .
-git commit -m “adding Appflow”
-git push ionic master
-```
-
-Next, create a local, native build of the app.
-
-## Android Builds
-
-Follow the [Android Setup instructions](../../../developing/android.mdx), which includes installing Java 8 and Android Studio on your machine. Then, in your Terminal run:
-
-```shell
-ionic cordova build android --prod
-```
-
-This will generate a unsigned debug build (meaning the app can run on any Android device).
-
-## iOS Builds
-
-iOS is [a bit trickier to set up](../../../developing/ios.mdx) than Android and requires a Mac computer. Ensure XCode is updated to the latest version and set up a development team. Then, in your Terminal, run:
-
-```shell
-ionic cordova build ios --prod
-```
-
-Then, continue to [follow the instructions here](../../../deployment/app-store.mdx) regarding signing certificates, etc. With a native version of your app built, let’s copy it to your device of choice.
-
-## Add the Native App to Your Local Device
-
-Now comes the fun part: testing out the native app on your device! For iOS, the easiest way (that works for both PC and Mac) involves using iTunes. Connect your iOS device, locate your IPA file, then drag and drop the IPA file from the file system onto your device in iTunes. The app will install immediately and be ready for use:
-
-
-
-
-
-
-
-
-For Android testing, the easiest way across all OS platforms is to use [Android Studio](https://developer.android.com/studio/), Google’s official Android IDE. After downloading it, connect your Android device to your computer. On the Studio startup screen, select “Profile or debug APK”, then select the recently built APK file.
-
-In the upper right hand corner, click the Play button. Select your connected device, then click OK:
-
-
-
-
-
-
-
-
-## Deploying Changes
-
-With Appflow Deploy, any JavaScript, HTML, or CSS changes can be pushed automatically to app users. Open the Photo Gallery app in your favorite code editor, then update the title of the Gallery page:
-
-```html
-
-
- Photo Viewer
-
-
-```
-
-Next, push the code up to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “change name to Photo Viewer”
-$ git push ionic master
-```
-
-Log into the [Appflow dashboard](https://dashboard.ionicframework.com) and navigate to Deploy -> Builds. You’ll see this newest commit begin to build immediately. Since we assigned the Appflow plugin to the Master branch (the one we always Git Push to), the Channel label will also point to this commit, effectively auto-deploying this change to all app users:
-
-
-
-A Channel points to a specific JavaScript Build or Snapshot of your app that will be shared with devices listening to that channel for updates. You can change which Build a Channel points to whenever you’d like.
-
-Each time a user launches our Photo Gallery app, it will poll for updates from Appflow. If new code is available, the update is downloaded in the background. There are [a handful of ways](https://ionic.io/docs/appflow/deploy/api#update_method) to control how updates are performed, but by default they will be applied the next time the user closes then opens the app.
-
-When the latest Build has been successful, close your local copy of Photo Gallery app or put it in the background for 30 seconds (the [MIN_BACKGROUND_DURATION default](https://ionic.io/docs/appflow/deploy/api#min_background_duration)), then reopen it. The title of the Photo Gallery page should change from “Photo Gallery” to “Photo Viewer.”
-
-What if you deploy a change, then realize that there is a bug? Or perhaps you’re just not happy with the name “Photo Viewer?” No problem: Appflow Deploy makes it easy to roll back changes as well!
-
-On the Deploy Builds page, click the “Assign to Channel” button on the previous commit, then click “Deploy.” App users will be reverted to the previous version, and our “Photo Gallery” name has been restored.
-
-
-
-This was just a taste of what you can do with Appflow Live Updates! You can also set up multiple deployment channels to send targeted updates to specific groups of users. Use it to run A/B tests, or target the distribution of updates by audience, geography, or test group.
-
-## Stuck on creating local native builds?
-
-Building native app binaries for Android and iOS can be painful. The tooling isn’t great, new OS versions often result in challenging upgrades, and creating consistent builds across your dev team can be frustrating. Fortunately, Appflow’s Package feature makes this easy: simply upload your iOS certificate and Android keystore files, then we take care of the rest!
-
-[Start packaging your app in the cloud](https://dashboard.ionicframework.com/settings/billing) along with 10,000 Ionic Deploys per month.
-
-Up next, we look at Appflow Monitoring - track your app errors in realtime.
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/theming.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v3/theming.mdx
deleted file mode 100644
index bc38fe59379..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/theming.mdx
+++ /dev/null
@@ -1,47 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box. You can find the code for this in [the “part 3” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub.
-
-Ionic has five default colors, defined as Sass variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base and contract property. Base acts as the background color and contrast acts as the text color for most components. This provides much more flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```Css
-$colors: (
- primary: #7044ff,
-)
-```
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp, {
- mode: "md"
- }, null),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with Sass variables and platform-specific styling. You now have everything you need to get started with Ionic. Go forth and build great apps!
-
-If you're interested in taking your Ionic apps to the next level, continue on with our exploration of Appflow next.
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
deleted file mode 100644
index 0417b953de6..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
+++ /dev/null
@@ -1,92 +0,0 @@
-# Track Bugs in Realtime with Ionic Monitoring
-
-Bugs happen, and can be hard to track down - especially with hundreds of possible combinations of mobile devices and operating systems. Appflow Monitoring allows you to track errors in your app on users’ phones and it sends them directly to you instantly, even if your code is minified!
-
-Reducing customer frustration by fixing major issues quickly in your production apps are a substantial part of providing a high quality app experience. Combined with Appflow Deploy, new updates can be rolled out quickly to address problems in real-time.
-
-To begin, let’s add a global error handler that will catch and report all unhandled exceptions that occur in the app. Open `src/app/app.module.ts`, then add two import statements:
-
-```javascript
-import { ErrorHandler, Injectable, Injector } from '@angular/core';
-import { IonicErrorHandler } from 'ionic-angular';
-```
-
-Next, create an error handler class calls the Monitoring service’s API whenever any errors have been encountered:
-
-```javascript
-@Injectable()
-export class MyErrorHandler implements ErrorHandler {
- ionicErrorHandler: IonicErrorHandler;
-
- constructor(injector: Injector) {
- try {
- this.ionicErrorHandler = injector.get(IonicErrorHandler);
- } catch (e) {
- // Unable to get the IonicErrorHandler provider, ensure
- // IonicErrorHandler has been added to the providers list below
- }
- }
-
- handleError(err: any): void {
- Pro.monitoring.handleNewError(err);
-
- this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
- }
-}
-```
-
-Then, within the providers array, update IonicErrorHandler to MyErrorHandler:
-
-```javascript
-{provide: ErrorHandler, useClass: MyErrorHandler},
-```
-
-It should then look like:
-
-```javascript
-providers: [
- // ...
- IonicErrorHandler,
- [{ provide: ErrorHandler, useClass: MyErrorHandler }],
-];
-```
-
-Next, let’s intentionally create a bug so we can demonstrate the power of Ionic Monitoring. Open `about.html` and rename the takePicture method to something that doesn’t exist, such as “takePhoto”:
-
-```html
-
-```
-
-With this change in place, anytime a user taps on the Camera button, an exception will be thrown and sent to Ionic’s Monitoring service.
-
-Last, we need to need to create a Source Map for your app. This file makes it easy for Monitoring to pinpoint problems by providing stack traces that map back to the original, unminified TypeScript code.
-
-Sync the current version of the app by running the following:
-
-```shell
-ionic monitoring syncmaps
-```
-
-With our intentional error in place, let’s try it out to see what happens. Run your app locally:
-
-```shell
-ionic serve
-```
-
-Tap on the Gallery tab, then the camera button. A runtime error should occur. In a browser, head over to the [Appflow dashboard](https://dashboard.ionicframework.com), then Monitor -> Monitoring. After a few minutes, the error should appear:
-
-
-
-Clicking on the event gives us lots of details surrounding what happened, such as a full stack trace. In this instance, we see that the error occurred three times on Mac OS X in the Chrome web browser.
-
-
-
-Given the proliferation of mobile devices and operating systems these days, this is immensely powerful. Armed with these details, we can hone in on the problem and fix it quickly.
-
-This is a TypeScript bug, meaning a fix can be released using Live Updates. Give it a try!
-
-- Revert the method back to “takePicture.”
-- Push the fix using Git. Remember, “git push ionic master.”
-- Roll out the fix using Live Updates from the Ionic dashboard.
-
-Supporting hundreds of mobile device types is so much easier with Appflow Monitoring. [Upgrade to the Appflow Developer plan today](https://dashboard.ionicframework.com/settings/billing) to get instant notification when bugs occur, save error history for sixty days (instead of seven), and unlock 10,000 live Deploy updates per month!
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 5e1d62fed1b..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,202 +0,0 @@
-import DocsButton from '@components/page/native/DocsButton';
-
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the Tab2 page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g service services/Photo
-```
-
-This creates a PhotoService class in a dedicated "services" folder:
-
-```Javascript
-import { Injectable } from '@angular/core';
-
-@Injectable({
- providedIn: 'root'
-})
-export class PhotoService {
- constructor() { }
-}
-```
-
-Within this file, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoService {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `tab2.page.ts`, import PhotoService:
-
-```Javascript
-import { PhotoService } from '../services/photo.service';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoService) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera and CameraOptions imports, and the Tab2Page page constructor.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `tab2.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class Tab2Page {
- constructor(public photoService: PhotoService) { }
-}
-```
-
-Next, in `tab2.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (`size="6"`), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoService’s `takePicture` method:
-
-```Html
-
-
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the [Ionic Storage plugin](https://ionicframework.com/docs/storage/), as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-@NgModule({
- declarations: [AppComponent],
- entryComponents: [],
- imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
- IonicStorageModule.forRoot()
- ],
- providers: [
- StatusBar,
- SplashScreen,
- Camera,
- { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
- ],
- bootstrap: [AppComponent]
-})
-export class AppModule {}
-```
-
-It’s now ready to be used in our PhotoService class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
-}, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
-}
-```
-
-Over in the Tab2 page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the Tab2 page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Next up, we’ll look at how to apply a custom theme to an Ionic app.
-
-
-
- Continue{' '}
-
-
-
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/intro.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v4/intro.mdx
deleted file mode 100644
index 7916776c975..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/intro.mdx
+++ /dev/null
@@ -1,97 +0,0 @@
-# Your First Ionic App: Angular
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Note that all code referenced in this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4/).
-
-## Required Tools
-
-Download/install these right away to ensure an optimal Ionic development experience:
-
-- [Git](https://git-scm.com/downloads) for version control.
-- SSH client, such as [PuTTy](https://putty.software/), for secure login to Appflow.
-- Node.js for interacting with the Ionic ecosystem. [Download the LTS version here](https://nodejs.org/en/).
-- A code editor for... writing code! We are fans of [Visual Studio Code](https://code.visualstudio.com/).
-- Command-line terminal (CLI): FYI Windows users, for the best Ionic experience, we
- recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode. For
- Mac/Linux
- users, virtually any terminal will work.
-
-## Install Ionic and Cordova
-
-Run the following in the command line:
-
-```shell
-npm install -g @ionic/cli cordova
-```
-
-:::note
-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. See [Resolving Permission Errors](../../../developing/tips.mdx#resolving-permission-errors) for more information.
-:::
-
-## Create an App
-
-Next, create an Ionic Angular app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-Next, change into the app folder:
-
-```shell
-cd photo-gallery
-```
-
-That’s it! Now for the fun part - let’s see the app in action.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs. Click on the Tab2 tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform this page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/app/tab2/tab2.page.html`. We see:
-
-```html
-
-
- Tab Two
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the Tab Two page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/app/tabs/tabs.page.html`. Change the label to “Gallery” and the icon name to “images”:
-
-```html
-
-
- Gallery
-
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to your iOS or Android device, then continue building the photo gallery.
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/ios-android-camera.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v4/ios-android-camera.mdx
deleted file mode 100644
index d5c4dfcb129..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/ios-android-camera.mdx
+++ /dev/null
@@ -1,154 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature.
-
-## Add Cordova iOS and Android Platforms
-
-Ionic leverages the open source [Cordova project](https://cordova.apache.org/docs/en/latest/guide/overview/) to provide native hardware support. We begin by adding the iOS and Android _platforms_ then will add specific _plugins_ like the Camera afterwards:
-
-```shell
-$ ionic cordova platform add ios
-$ ionic cordova platform add android
-```
-
-These commands will create a `config.xml` file, which is used to define Cordova iOS and Android settings. Cordova reads this file and applies each setting as it builds each native app binary.
-
-There are more steps to configure [iOS](../../../developing/ios.mdx) and [Android](../../../developing/android.mdx) native tooling.
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-Back in `tab2.page.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added, with a version number similar to the following:
-
-`"@awesome-cordova-plugins/camera": "^5.4.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device. For more info on how this works, read up on [Cordova](https://cordova.apache.org/docs/en/latest/guide/overview/) and [Ionic Native](https://ionicframework.com/docs/native).
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-The `config.xml` file is now updated with an entry similar to the following for the native camera code:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this inside the ios platform section () of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the Gallery page
-
-Our camera button doesn’t do anything yet. Over in `tab2.page.html`, add a click handler to the button:
-
-```html
-
-
-
-
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `tab2.page.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-}
-```
-
-Finally, add the “takePicture” method in `tab2.page.ts`. It is already wired up to execute once the camera button has been tapped:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-
- takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- };
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-}
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere. 😀
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Next, we’ll look at how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/theming.mdx b/versioned_docs/version-v5/developer-resources/guides/first-app-v4/theming.mdx
deleted file mode 100644
index c55d591b308..00000000000
--- a/versioned_docs/version-v5/developer-resources/guides/first-app-v4/theming.mdx
+++ /dev/null
@@ -1,56 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box.
-
-Ionic has nine default colors, defined as CSS variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base, contrast, shade, and tint properties. These provide flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```css
-/** Ionic CSS Variables **/
-:root {
- /** primary **/
- --ion-color-primary: #b36bff;
- --ion-color-primary-rgb: 179, 107, 255;
- --ion-color-primary-contrast: #000000;
- --ion-color-primary-contrast-rgb: 0, 0, 0;
- --ion-color-primary-shade: #9e5ee0;
- --ion-color-primary-tint: #bb7aff;
-}
-```
-
-The easiest and most powerful way to create custom color palettes for your app’s UI is Ionic's [Color Generator tool](../../../theming/color-generator.mdx). As you change a color’s hex values, the embedded demo app automatically reflects the new colors. When you've finished making changes, simply copy and paste the generated code directly into your Ionic project.
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot({
- mode: "md"
- }),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with CSS variables and platform-specific styling. You now have everything you need to get started with Ionic.
-
-Go forth and build great apps!
diff --git a/versioned_docs/version-v5/developer-resources/posts.mdx b/versioned_docs/version-v5/developer-resources/posts.mdx
deleted file mode 100644
index a8c5b3f861c..00000000000
--- a/versioned_docs/version-v5/developer-resources/posts.mdx
+++ /dev/null
@@ -1,77 +0,0 @@
----
-sidebar_label: Posts
----
-
-# Community Posts
-
-### [What's new in Ionic 5 - Migration and Free Starter](https://ionicthemes.com/tutorials/about/ionic5-tutorial-migration-and-starter)
-
-Take advantage of the new benefits from Ionic 5. In this guide we describe the main changes and show you how to migrate your applications from Ionic 4 to Ionic 5. For this post we created an Ionic 5 CRUD Contacts app that you can download for free to learn how to start using Ionic 5.
-
-### [Ionic Navigation and Angular Routing](https://ionicthemes.com/tutorials/about/ionic-navigation-and-routing-ultimate-guide)
-
-Learn how to master Routing and Navigation in Ionic Angular Apps as well as some usability tricks you can add to your apps to improve the user experience!
-
-### [Firebase Authentication Tutorial For Ionic Apps](https://ionicthemes.com/tutorials/about/firebase-authentication-in-ionic-framework-apps)
-
-Learn how to add Firebase Authentication to your Ionic 5 App. This tutorial explains step by step how to configure both the Firebase and the Ionic Apps to enable authentication with social providers such as Google, Facebook and Twitter and also with Email and Password.
-
-### [Native Cross Platform Web Apps with Ionic Capacitor](https://ionicthemes.com/tutorials/about/native-cross-platform-web-apps-with-ionic-capacitor)
-
-Ionic Capacitor introduction guide for beginners: history, motivation, usage and how to migrate your existing Cordova apps to Capacitor.
-
-### [Ionic Skeleton Loading Screens](https://ionicthemes.com/tutorials/about/improved-ux-for-ionic-apps-with-skeleton-loading-screens)
-
-UI Skeletons, Ghost Elements, Shell Elements? They are all the same! Think of them as cool content placeholders that are shown where the content will eventually be once it becomes available. In this guide you will learn the importance of adopting the App Shell pattern in your ionic apps and discuss how to implement it using Ionic and Angular. Also, we explain some advanced CSS techniques to take the UX to the next level.
-
-### [The Complete Guide To Progressive Web Apps with Ionic](https://ionicthemes.com/tutorials/about/the-complete-guide-to-progressive-web-apps-with-ionic4)
-
-Learn what Progressive Web Apps are, why you should consider them for your next project, and how easy is to build a complete and production ready PWA with Ionic.
-
-### [Mastering Web Components in Ionic](https://ionicthemes.com/tutorials/about/ionic-4-tutorial-mastering-web-components-in-ionic-4)
-
-Understanding the new component architecture in Ionic, including web components, shadow DOM, CSS 4 variables and Stencil.
-
-### [Forms and Validations in Ionic 5](https://ionicthemes.com/tutorials/about/forms-and-validation-in-ionic)
-
-Learn everything about Ionic Forms and input validations in Ionic Angular apps.
-
-### [Building a Ionic Firebase App step by step](https://ionicthemes.com/tutorials/about/building-a-ionic-firebase-app-step-by-step)
-
-Learn how to make a CRUD application using Ionic Framework, Cloud Firestore for the database, and Cloud Storage for image storage.
-
-### [Ionic and WordPress Integration using the WordPress REST API](https://ionicthemes.com/tutorials/about/ionic-wordpress-integration)
-
-Learn how to connect your Ionic app with your WordPress site using the WordPress REST API.
-
-### [Understanding Ionic 2: Imports](http://mcgivery.com/understanding-ionic-2-imports/)
-
-ES6/TS introduce a new way to bring in external code. Learn about Imports.
-
-### [Ionic 2 / Angular 2 Concepts](https://www.joshmorony.com/ionic-2-first-look-series-new-angular-2-concepts-syntax/)
-
-Familiarize yourself with some of the new concepts in Ionic 2 and Angular 2.
-
-### [Ionic, PouchDB, & SQLite For Storage](http://gonehybrid.com/how-to-use-pouchdb-sqlite-for-local-storage-in-ionic-2/)
-
-Simplify storage using PouchDB and Sqlite.
-
-### [Advanced Google Maps](https://www.joshmorony.com/creating-an-advanced-google-maps-component-in-ionic-2/)
-
-Go beyond adding a simple map to handling offline conditions and complex maps.
-
-### [Background Geolocation](https://www.joshmorony.com/adding-background-geolocation-to-an-ionic-2-application/)
-
-Learn how to add geolocation that can run in the background of your app.
-
-### [Taking Advantage of Observables](https://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html)
-
-Learn how to use observables in your Ionic 2 app.
-
-### [Using the Angular Router in ionic/angular 4](https://www.joshmorony.com/using-angular-routing-with-ionic-4/)
-
-Learn how to use the Angular Router in your `@ionic/angular` 4 app.
-
-### [Ionic 4 examples using Angular, Vue and React](https://ionicworkshop.com/posts/introduction-to-ionic-framework-angular-vue-react/)
-
-Learn how to use Ionic 4 with Angular, React and Vue.
diff --git a/versioned_docs/version-v5/developer-resources/tools.mdx b/versioned_docs/version-v5/developer-resources/tools.mdx
deleted file mode 100644
index aa1a7301ba9..00000000000
--- a/versioned_docs/version-v5/developer-resources/tools.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Tools
-
-### [Angular CLI](https://github.com/angular/angular-cli)
-
-Learn more about the power of the Angular CLI
-
-### [StackBlitz](https://stackblitz.com/)
-
-Quickly get started with a new Ionic app entirely in the browser!
-
-### [TypeScript](https://www.typescriptlang.org/)
-
-Check out the features that make working with TypeScript amazing.
-
-### [Glossary](../reference/glossary.mdx)
-
-A list of common terms you'll see while developing in Ionic.
-
-### [Starter Apps](https://ionicthemes.com)
-
-Ionic Starter Apps to speed up and improve your app development.
diff --git a/versioned_docs/version-v5/developer-resources/videos.mdx b/versioned_docs/version-v5/developer-resources/videos.mdx
deleted file mode 100644
index bdc0a784d25..00000000000
--- a/versioned_docs/version-v5/developer-resources/videos.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Videos
-
-### [Ionic 2 Crash Course](https://www.youtube.com/watch?v=O2WiI9QrS5s&feature=youtu.be)
-
-A quick introduction to Ionic 2 and how to build your first app.
-
-### [Ionic & Async](https://blog.ionicframework.com/screencast-ionic-async/)
-
-Learn how to coordinate multiple events in a timely manner.
-
-### [Building a TODO app in Ionic 2](http://www.joshmorony.com/build-a-todo-app-from-scratch-with-ionic-2-video-tutorial/)
-
-Learn how to build out an entire Ionic 2 app.
-
-### [Angular Connect: Ionic 2](https://www.youtube.com/watch?v=bAlydPwFONY)
-
-Dive into some of the ideas and goals behind Ionic 2.
-
-### [Ionic & Typings](https://blog.ionicframework.com/ionic-and-typings/)
-
-Learn how to add typings for libraries you are using in your Ionic 2 app.
diff --git a/versioned_docs/version-v5/intro/first-app.mdx b/versioned_docs/version-v5/intro/first-app.mdx
deleted file mode 100644
index 3fc9be2b1fd..00000000000
--- a/versioned_docs/version-v5/intro/first-app.mdx
+++ /dev/null
@@ -1,24 +0,0 @@
----
-hide_table_of_contents: true
----
-
-import DocsCard from '@components/global/DocsCard';
-import DocsCards from '@components/global/DocsCards';
-
-# Build Your First App Tutorial
-
-Pick the JavaScript framework you plan to use while building your Ionic app:
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Angular.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with React.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Vue.
-
-
diff --git a/versioned_docs/version-v5/test/page1.mdx b/versioned_docs/version-v5/test/page1.mdx
deleted file mode 100644
index cd5b72410d0..00000000000
--- a/versioned_docs/version-v5/test/page1.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 1
-
-This is Testing page 1, Get to Testing Page 2 [here](page2.mdx).
diff --git a/versioned_docs/version-v5/test/page2.mdx b/versioned_docs/version-v5/test/page2.mdx
deleted file mode 100644
index 5ebdef8dca0..00000000000
--- a/versioned_docs/version-v5/test/page2.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 2
-
-This is Testing page 2, Get to Testing Page 1 [here](page1.mdx).
diff --git a/versioned_docs/version-v6/angular/your-first-app.mdx b/versioned_docs/version-v6/angular/your-first-app.mdx
index bbd710f7b51..24a155ea090 100644
--- a/versioned_docs/version-v6/angular/your-first-app.mdx
+++ b/versioned_docs/version-v6/angular/your-first-app.mdx
@@ -24,10 +24,6 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-:::note
-Looking for the previous version of this guide that covered Ionic 4 and Cordova? [See here.](../developer-resources/guides/first-app-v4/intro.mdx)
-:::
-
## What We'll Build
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
diff --git a/versioned_docs/version-v6/developer-resources/books.mdx b/versioned_docs/version-v6/developer-resources/books.mdx
deleted file mode 100644
index e3eae671a5a..00000000000
--- a/versioned_docs/version-v6/developer-resources/books.mdx
+++ /dev/null
@@ -1,75 +0,0 @@
-# Books
-
-### [Learn Ionic 4 From Scratch](https://leanpub.com/learnionic4fromscratch)
-
-Angular. Vue. React. Vanilla JavaScript. All of these tools can be used to create awesome applications with Ionic, thanks to the new Stencil compiler. This book is aimed at beginners that are looking to create amazing web, mobile and desktop applications using Ionic with examples across all of the popular frameworks.
-
-{/* cspell:disable-next-line */}
-
-by [Paul Halliday](https://developer.school)
-
-### [Creating Ionic Applications with StencilJS](https://www.joshmorony.com/creating-ionic-applications-with-stencil-js/) - [Free Preview](https://cdn2.hubspot.net/hubfs/3776657/PREVIEW-Creating-Ionic-Apps-with-StencilJS.pdf)
-
-As well as being a powerful tool for generating reuseable web components, StencilJS provides the tools needed to build an entire application out of web components. Combined with the Ionic web components, StencilJS gives us everything we need to build high-quality production mobile applications - no framework required.
-
-{/* cspell:disable-next-line */}
-
-by [Joshua Morony](https://www.joshmorony.com/blog)
-
-### [Mobile App Development with Ionic: Cross-Platform Apps with Ionic 2, Angular 2, and Cordova](https://www.amazon.com/Mobile-App-Development-Ionic-Cross-Platform/dp/1491937785/ref=sr_1_2?ie=UTF8&qid=1464183332&sr=8-2&keywords=ionic+2)
-
-{/* cspell:disable-next-line */}
-
-by Chris Griffith
-
-### [Building Mobile Apps with Ionic & Angular](https://www.joshmorony.com/building-mobile-apps-with-ionic-2/)
-
-{/* cspell:disable-next-line */}
-
-by [Joshua Morony](https://www.joshmorony.com/blog)
-
-Building Mobile Apps with Ionic & Angular is an all-in-one resource for learning the latest and greatest version of Ionic. It is targeted at beginners and works its way through the basics of Ionic, to example applications of varying complexity, and then to the steps required to build and publish your application (on the app stores or as a PWA). It has been updated for every major release, so you can rest easy knowing that you're not learning outdated tech.
-
-### [Ionic 2 From Zero to App Store](https://devdactic.com/zero-to-app)
-
-{/* cspell:disable-next-line */}
-
-by Simon Reimler
-
-### [Ionic Framework By Example](https://www.packtpub.com/application-development/ionic-framework-example)
-
-{/* cspell:disable-next-line */}
-
-by Sani Yusuf
-
-### [Building Firestore Powered Ionic Apps](https://javebratt.com/ionic-firebase-book/)
-
-{/* cspell:disable-next-line */}
-
-by Jorge Vergara
-
-This book will help you go from not knowing what Firebase is to be able to use the different APIs for your Ionic Applications. It will take you from “_What’s Firebase?_” to building scalable, production-ready apps and it’s always up-to-date with latest Ionic and Firebase versions.
-
-### [Ionic 2 Cookbook - Second Edition](https://www.amazon.com/Ionic-Cookbook-Second-Hoc-Phan-ebook/dp/B01C4D9VWS?ie=UTF8&keywords=ionic%202&qid=1464183332&ref_=sr_1_3&sr=8-3)
-
-{/* cspell:disable-next-line */}
-
-by Hoc Phan
-
-### [Mastering Ionic 2](https://www.leanpub.com/masteringionic2)
-
-{/* cspell:disable-next-line */}
-
-by James Griffiths
-
-### [Learning Ionic](https://www.packtpub.com/in/application-development/learning-ionic) (Ionic 1)
-
-{/* cspell:disable-next-line */}
-
-by Arvind Ravulavaru
-
-### [Learning Ionic - Second Edition](https://www.packtpub.com/in/web-development/learning-ionic-second-edition) (Ionic 2/3)
-
-{/* cspell:disable-next-line */}
-
-by Arvind Ravulavaru
diff --git a/versioned_docs/version-v6/developer-resources/courses.mdx b/versioned_docs/version-v6/developer-resources/courses.mdx
deleted file mode 100644
index 568f0fc05a4..00000000000
--- a/versioned_docs/version-v6/developer-resources/courses.mdx
+++ /dev/null
@@ -1,107 +0,0 @@
-# Courses
-
-### [Elite Ionic](https://www.joshmorony.com/elite/)
-
-{/* cspell:disable-next-line */}
-
-by Josh Morony
-
-Elite Ionic is an online course for Ionic developers who want to move past the basics, and build complex, well tested, high performing, beautiful, and useable mobile applications. It is recommended that you already have a reasonably solid understanding of the basics of Ionic before starting this course.
-
-### [Ionic Academy](https://ionicacademy.com/)
-
-{/* cspell:disable-next-line */}
-
-by Simon Grimm
-
-Learn Ionic with step-by-step video courses & quick wins from one of the Ionic community leaders. Covers beginner, intermediate and advanced topics. Get access to a community of developers just like you.
-
-### [Ionic Framework: Tips, Tricks & Techniques](https://www.packtpub.com/mobile/ionic-framework-tips-tricks-and-techniques-video)
-
-{/* cspell:disable-next-line */}
-
-by Charles Muzonzini
-
-In this course, you will master tips and best practices for Ionic 4 & Ionic 5 that you can immediately implement to build high quality apps. This course covers a wide variety of topics from increasing app performance, to building custom native plugins, to securing your apps. It's a practical, hands-on course that will take your app building skills to the next level.
-
-### [Building Desktop Apps with Ionic and Electron](https://pluralsight.pxf.io/VeMXO)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Desktop development has historically required dramatically different skills than those required for web
-development. The two disciplines don't mesh well. In this course, Building Desktop Apps with Ionic and Electron,
-you will gain the ability to apply your hard-earned web development skills to build amazing desktop
-applications. First, you will learn how to build a functional and attractive UI with Ionic and Angular. Next,
-you will discover how to wrap that UI into an Electron application shell. Finally, you will explore how to
-package your app and make it ready for distribution. When you are finished with this course, you will have the
-skills and knowledge of Ionic and Electron development needed to deploy and distribute a beautiful app to both
-Windows and macOS users.
-
-### [Building Progressive Web Apps with Ionic](https://pluralsight.pxf.io/Ly2EY)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Everything changed when Google created the concept of Progressive Web Applications or PWA. A PWA is a pure web
-application that you can install on devices, that can function with limited network functionality, through its
-use of intelligent caching. Build a Progressive Web App that will run anywhere. In this course, Building
-Progressive Web Apps with Ionic, you will learn foundational knowledge and gain the ability to create a web
-application that will run anywhere: the browser, desktop, or mobile clients. First, you will learn what a
-Progressive Web App (or PWA) is. Next, you will discover how to use the Ionic Framework, Angular, and Firebase
-to create, deploy, and optimize a basic web application into a full-blown PWA. Finally, you will explore how to
-configure the application to make it installable and runnable on Androids and iPhones. When you’re finished with
-this course, you will have the skills and knowledge of Ionic and PWAs needed to create and deploy your own
-Progressive Web Application anywhere you desire.
-
-### [Ionic CLI](https://pluralsight.pxf.io/ionic-cli)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Since its inception, the Ionic Framework has included a rudimentary command line interface. Though only a few
-years old, it has matured into a powerful tool that should be part of every developer’s toolbox. This course,
-Ionic CLI, will start at the top and explore the Ionic CLI. First, you'll see how to create projects and
-components. Next, you will learn how to build and serve apps. Finally, you'll discover how to share projects
-with others, and even integrate with other build tools. Whether you’re just starting to explore Ionic, or have
-been using it since its pre-beta days, there is something here for you. By the end of the course, you’ll have
-the confidence to use the Ionic CLI as part of your everyday Ionic development.
-
-### [Wordpress Rest API and Ionic 4 (Angular) App With Auth](https://www.udemy.com/course/wordpress-rest-api-and-ionic-3-crud/)
-
-{/* cspell:disable-next-line */}
-
-by Baljeet Singh at Udemy
-
-### [Building Mobile Apps with Ionic 2, Angular 2, and TypeScript](https://app.pluralsight.com/library/courses/ionic2-angular2-typescript-mobile-apps/table-of-contents)
-
-{/* cspell:disable-next-line */}
-
-by Pluralsight
-
-### [Introducing Ionic 2](http://shop.oreilly.com/product/0636920050353.do)
-
-{/* cspell:disable-next-line */}
-
-by Mathieu Chauvinc
-
-### [Ionic 2 Master Course](https://www.udemy.com/ionic-2-tutorial/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Introducing Ionic 2](https://www.udemy.com/introducing-ionic-2/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Ionic 2 Solutions](https://www.packtpub.com/web-development/ionic-2-solutions-video)
-
-{/* cspell:disable-next-line */}
-
-by Hoc Phan
diff --git a/versioned_docs/version-v6/developer-resources/guides.mdx b/versioned_docs/version-v6/developer-resources/guides.mdx
deleted file mode 100644
index c0590b83684..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
-# Guides
-
-### [Your First Ionic App - v3](guides/first-app-v3/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v3 and Appflow.
-
-### [Your First Ionic 4 App - Angular and Cordova](guides/first-app-v4/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v4 and Cordova.
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 7887f03a320..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,195 +0,0 @@
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the About page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this in [the part 2 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part2) on GitHub.
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g provider PhotoProvider
-```
-
-This creates a PhotoProvider class in a dedicated providers/photo folder:
-
-```Javascript
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-
-/*
- Generated class for the PhotoProvider provider.
-
- See https://angular.io/guide/dependency-injection for more info on providers
- and Angular DI.
-*/
-@Injectable()
-export class PhotoProvider {
-
- constructor(public http: HttpClient) {
- console.log('Hello PhotoProvider Provider');
- }
-}
-```
-
-Within this class, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoProvider {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `about.ts`, import PhotoProvider:
-
-```Javascript
-import { PhotoProvider } from '../../providers/photo/photo';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoProvider) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera import, and the About page constructor. Also, remove references to HttpClient - we won’t be making any HTTP calls.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `about.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class AboutPage {
- constructor(public navCtrl: NavController, public photoService: PhotoProvider) { }
-}
-```
-
-Next, in `about.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (“col-6”), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoProvider’s `takePicture` method:
-
-```Html
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the Ionic Storage plugin, as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp),
- IonicStorageModule.forRoot()
- ],
-```
-
-It’s now ready to be used in our PhotoProvider class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
- }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
- });
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
- }
-```
-
-Over in the About page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the About page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “implemented photo gallery”
-git push ionic master
-```
-
-Next up, we’ll look at how to apply a custom theme to an Ionic app.
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/intro.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v3/intro.mdx
deleted file mode 100644
index 4d44434249f..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/intro.mdx
+++ /dev/null
@@ -1,117 +0,0 @@
-# Your First Ionic App - Framework v3
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Reference code for this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/).
-
-## Install Node.js
-
-If you don’t have Node.js installed already, [download the LTS version](https://nodejs.org/en/).
-
-## Install Ionic
-
-Run the following in the command line (you may need to prepend “sudo” on a Mac):
-
-```shell
-npm install -g @ionic/cli
-```
-
-## Create an App
-
-Next, create an Ionic app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-“Would you like to integrate your new app with Cordova to target native iOS and Android?”
-
-Type “y” and press Enter. Project setup may take a few moments.
-
-“Install the free Appflow SDK and connect your app?”
-
-Type “y” and press Enter. [Appflow](https://ionicframework.com/pro) is a powerful set of services and features built on top of the flagship Ionic Framework. This includes updating your app instantly (skipping the app store review process!), packaging apps in the cloud, and error monitoring.
-
-Log into your Ionic Account
-
-Sign in now to easily access awesome features like Live Deploys later in this tutorial.
-
-What would you like to do?
-
-Choose “Create a new app on Appflow.”
-
-Which git host would you like to use?
-
-Choose “Appflow.”
-
-“How would you like to connect to Appflow?”
-
-- Choose “Automatically setup a new SSH key pair for Appflow” if you haven’t used SSH before.
-- Choose “Use an existing SSH key pair” if you’ve used SSH before.
-
-Next, change into the app folder, then push your code to Appflow:
-
-```shell
-$ cd photo-gallery
-$ git push ionic master
-```
-
-That’s it! Now for the fun part - let’s see it in action.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs: “Home”, “About”, and “Contact.” Click on the About tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform the About page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/pages/about/about.html`. We see:
-
-```html
-
-
- About
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with “About” as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the About page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/pages/tabs/tabs.html`. Change the tabTitle to “Gallery” and the tabIcon to “images”:
-
-```html
-
-
-
-
-
-```
-
-Now, back up your changes to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “converting about page to photo gallery”
-$ git push ionic master
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to iOS and Android, then continue building the photo gallery.
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/ios-android-camera.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v3/ios-android-camera.mdx
deleted file mode 100644
index ff861040e51..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/ios-android-camera.mdx
+++ /dev/null
@@ -1,156 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature. Fortunately, Ionic provides a way to skip the frustration of dealing with native SDK installations: Ionic DevApp!
-
-The Ionic DevApp is a free app that makes it easy to run your Ionic app directly on your iOS or Android device. Download it here, then open on your device:
-
-
-
-
-
-
-
-
-Afterwards, open a terminal and navigate to your Ionic project. Execute the following:
-
-```shell
-ionic serve -c
-```
-
-In DevApp, you should now see the app appear. If it doesn't, or you have any issues throughout creating this app, [see here](https://ionicframework.com/docs/pro/devapp/).
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this in [the “part 1” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part1) on GitHub.
-
-Back in `about.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install --save @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added:
-
-`"@awesome-cordova-plugins/camera": "^4.12.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device:
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-In `config.xml`, a new plugin entry is created:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this to the bottom of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the About page
-
-Our camera button doesn’t do anything yet. Over in `about.html`, add a click handler to the button:
-
-```html
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `about.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class AboutPage {
- currentImage: any;
-
- constructor(public navCtrl: NavController, private camera: Camera) {
-}
-```
-
-Finally, add the “takePicture” method, already wired up to execute once the camera button has been tapped:
-
-```Javascript
-takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- }
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere `:)`
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “added camera functionality”
-git push ionic master
-```
-
-Next, we’ll look at how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
deleted file mode 100644
index 30049b7017e..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
+++ /dev/null
@@ -1,193 +0,0 @@
-# Realtime App Updates with Appflow Live Updates
-
-As you’ve seen so far, building web and mobile apps is quick and easy with the Ionic Framework. However, nothing disrupts rapid iteration faster than App Store delays. Fortunately, with Appflow’s Deploy feature, you can send live code changes directly to your users. Paired with seamless background updates, they are always upgraded to the latest version.
-
-Setting it up is quick and easy. For reference, continue to refer to [the part 3 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub. First, install the Appflow JavaScript library:
-
-```shell
-npm install @ionic/pro@latest --save
-```
-
-Then, add the Appflow plugin. Here’s the command to install it:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=YOUR_APP_ID --variable CHANNEL_NAME=YOUR_CHANNEL_NAME
-```
-
-There are two unique values to provide: your app id and channel name. Sign into Appflow, then find the App Id on your app’s dashboard:
-
-
-
-And we’ll just use “Master” as the channel name. Putting this together looks like:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=381533B9 --variable CHANNEL_NAME=Master
-```
-
-After this plugin has been added, you’ll notice that `config.xml` and `package.json` have been updated with your app’s details:
-
-```xml
-
-
-
-
-
-
-
-
-
-```
-
-Next, modify `src/app/app.module.ts` to include the initialization of Appflow on app startup:
-
-```javascript
-import { Pro } from '@ionic/pro';
-
-Pro.init('YOUR_APP_ID', {
- appVersion: 'APP_VERSION',
-});
-```
-
-As an example, this would look like:
-
-```javascript
-Pro.init('381533B9', {
- appVersion: '0.0.1',
-});
-```
-
-Next, push the code up to Appflow:
-
-```shell
-git add .
-git commit -m “adding Appflow”
-git push ionic master
-```
-
-Next, create a local, native build of the app.
-
-## Android Builds
-
-Follow the [Android Setup instructions](../../../developing/android.mdx), which includes installing Java 8 and Android Studio on your machine. Then, in your Terminal run:
-
-```shell
-ionic cordova build android --prod
-```
-
-This will generate a unsigned debug build (meaning the app can run on any Android device).
-
-## iOS Builds
-
-iOS is [a bit trickier to set up](../../../developing/ios.mdx) than Android and requires a Mac computer. Ensure XCode is updated to the latest version and set up a development team. Then, in your Terminal, run:
-
-```shell
-ionic cordova build ios --prod
-```
-
-Then, continue to [follow the instructions here](../../../deployment/app-store.mdx) regarding signing certificates, etc. With a native version of your app built, let’s copy it to your device of choice.
-
-## Add the Native App to Your Local Device
-
-Now comes the fun part: testing out the native app on your device! For iOS, the easiest way (that works for both PC and Mac) involves using iTunes. Connect your iOS device, locate your IPA file, then drag and drop the IPA file from the file system onto your device in iTunes. The app will install immediately and be ready for use:
-
-
-
-
-
-
-
-
-For Android testing, the easiest way across all OS platforms is to use [Android Studio](https://developer.android.com/studio/), Google’s official Android IDE. After downloading it, connect your Android device to your computer. On the Studio startup screen, select “Profile or debug APK”, then select the recently built APK file.
-
-In the upper right hand corner, click the Play button. Select your connected device, then click OK:
-
-
-
-
-
-
-
-
-## Deploying Changes
-
-With Appflow Deploy, any JavaScript, HTML, or CSS changes can be pushed automatically to app users. Open the Photo Gallery app in your favorite code editor, then update the title of the Gallery page:
-
-```html
-
-
- Photo Viewer
-
-
-```
-
-Next, push the code up to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “change name to Photo Viewer”
-$ git push ionic master
-```
-
-Log into the [Appflow dashboard](https://dashboard.ionicframework.com) and navigate to Deploy -> Builds. You’ll see this newest commit begin to build immediately. Since we assigned the Appflow plugin to the Master branch (the one we always Git Push to), the Channel label will also point to this commit, effectively auto-deploying this change to all app users:
-
-
-
-A Channel points to a specific JavaScript Build or Snapshot of your app that will be shared with devices listening to that channel for updates. You can change which Build a Channel points to whenever you’d like.
-
-Each time a user launches our Photo Gallery app, it will poll for updates from Appflow. If new code is available, the update is downloaded in the background. There are [a handful of ways](https://ionic.io/docs/appflow/deploy/api#update_method) to control how updates are performed, but by default they will be applied the next time the user closes then opens the app.
-
-When the latest Build has been successful, close your local copy of Photo Gallery app or put it in the background for 30 seconds (the [MIN_BACKGROUND_DURATION default](https://ionic.io/docs/appflow/deploy/api#min_background_duration)), then reopen it. The title of the Photo Gallery page should change from “Photo Gallery” to “Photo Viewer.”
-
-What if you deploy a change, then realize that there is a bug? Or perhaps you’re just not happy with the name “Photo Viewer?” No problem: Appflow Deploy makes it easy to roll back changes as well!
-
-On the Deploy Builds page, click the “Assign to Channel” button on the previous commit, then click “Deploy.” App users will be reverted to the previous version, and our “Photo Gallery” name has been restored.
-
-
-
-This was just a taste of what you can do with Appflow Live Updates! You can also set up multiple deployment channels to send targeted updates to specific groups of users. Use it to run A/B tests, or target the distribution of updates by audience, geography, or test group.
-
-## Stuck on creating local native builds?
-
-Building native app binaries for Android and iOS can be painful. The tooling isn’t great, new OS versions often result in challenging upgrades, and creating consistent builds across your dev team can be frustrating. Fortunately, Appflow’s Package feature makes this easy: simply upload your iOS certificate and Android keystore files, then we take care of the rest!
-
-[Start packaging your app in the cloud](https://dashboard.ionicframework.com/settings/billing) along with 10,000 Ionic Deploys per month.
-
-Up next, we look at Appflow Monitoring - track your app errors in realtime.
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/theming.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v3/theming.mdx
deleted file mode 100644
index bc38fe59379..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/theming.mdx
+++ /dev/null
@@ -1,47 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box. You can find the code for this in [the “part 3” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub.
-
-Ionic has five default colors, defined as Sass variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base and contract property. Base acts as the background color and contrast acts as the text color for most components. This provides much more flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```Css
-$colors: (
- primary: #7044ff,
-)
-```
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp, {
- mode: "md"
- }, null),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with Sass variables and platform-specific styling. You now have everything you need to get started with Ionic. Go forth and build great apps!
-
-If you're interested in taking your Ionic apps to the next level, continue on with our exploration of Appflow next.
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
deleted file mode 100644
index 0417b953de6..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
+++ /dev/null
@@ -1,92 +0,0 @@
-# Track Bugs in Realtime with Ionic Monitoring
-
-Bugs happen, and can be hard to track down - especially with hundreds of possible combinations of mobile devices and operating systems. Appflow Monitoring allows you to track errors in your app on users’ phones and it sends them directly to you instantly, even if your code is minified!
-
-Reducing customer frustration by fixing major issues quickly in your production apps are a substantial part of providing a high quality app experience. Combined with Appflow Deploy, new updates can be rolled out quickly to address problems in real-time.
-
-To begin, let’s add a global error handler that will catch and report all unhandled exceptions that occur in the app. Open `src/app/app.module.ts`, then add two import statements:
-
-```javascript
-import { ErrorHandler, Injectable, Injector } from '@angular/core';
-import { IonicErrorHandler } from 'ionic-angular';
-```
-
-Next, create an error handler class calls the Monitoring service’s API whenever any errors have been encountered:
-
-```javascript
-@Injectable()
-export class MyErrorHandler implements ErrorHandler {
- ionicErrorHandler: IonicErrorHandler;
-
- constructor(injector: Injector) {
- try {
- this.ionicErrorHandler = injector.get(IonicErrorHandler);
- } catch (e) {
- // Unable to get the IonicErrorHandler provider, ensure
- // IonicErrorHandler has been added to the providers list below
- }
- }
-
- handleError(err: any): void {
- Pro.monitoring.handleNewError(err);
-
- this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
- }
-}
-```
-
-Then, within the providers array, update IonicErrorHandler to MyErrorHandler:
-
-```javascript
-{provide: ErrorHandler, useClass: MyErrorHandler},
-```
-
-It should then look like:
-
-```javascript
-providers: [
- // ...
- IonicErrorHandler,
- [{ provide: ErrorHandler, useClass: MyErrorHandler }],
-];
-```
-
-Next, let’s intentionally create a bug so we can demonstrate the power of Ionic Monitoring. Open `about.html` and rename the takePicture method to something that doesn’t exist, such as “takePhoto”:
-
-```html
-
-```
-
-With this change in place, anytime a user taps on the Camera button, an exception will be thrown and sent to Ionic’s Monitoring service.
-
-Last, we need to need to create a Source Map for your app. This file makes it easy for Monitoring to pinpoint problems by providing stack traces that map back to the original, unminified TypeScript code.
-
-Sync the current version of the app by running the following:
-
-```shell
-ionic monitoring syncmaps
-```
-
-With our intentional error in place, let’s try it out to see what happens. Run your app locally:
-
-```shell
-ionic serve
-```
-
-Tap on the Gallery tab, then the camera button. A runtime error should occur. In a browser, head over to the [Appflow dashboard](https://dashboard.ionicframework.com), then Monitor -> Monitoring. After a few minutes, the error should appear:
-
-
-
-Clicking on the event gives us lots of details surrounding what happened, such as a full stack trace. In this instance, we see that the error occurred three times on Mac OS X in the Chrome web browser.
-
-
-
-Given the proliferation of mobile devices and operating systems these days, this is immensely powerful. Armed with these details, we can hone in on the problem and fix it quickly.
-
-This is a TypeScript bug, meaning a fix can be released using Live Updates. Give it a try!
-
-- Revert the method back to “takePicture.”
-- Push the fix using Git. Remember, “git push ionic master.”
-- Roll out the fix using Live Updates from the Ionic dashboard.
-
-Supporting hundreds of mobile device types is so much easier with Appflow Monitoring. [Upgrade to the Appflow Developer plan today](https://dashboard.ionicframework.com/settings/billing) to get instant notification when bugs occur, save error history for sixty days (instead of seven), and unlock 10,000 live Deploy updates per month!
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 5e1d62fed1b..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,202 +0,0 @@
-import DocsButton from '@components/page/native/DocsButton';
-
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the Tab2 page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g service services/Photo
-```
-
-This creates a PhotoService class in a dedicated "services" folder:
-
-```Javascript
-import { Injectable } from '@angular/core';
-
-@Injectable({
- providedIn: 'root'
-})
-export class PhotoService {
- constructor() { }
-}
-```
-
-Within this file, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoService {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `tab2.page.ts`, import PhotoService:
-
-```Javascript
-import { PhotoService } from '../services/photo.service';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoService) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera and CameraOptions imports, and the Tab2Page page constructor.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `tab2.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class Tab2Page {
- constructor(public photoService: PhotoService) { }
-}
-```
-
-Next, in `tab2.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (`size="6"`), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoService’s `takePicture` method:
-
-```Html
-
-
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the [Ionic Storage plugin](https://ionicframework.com/docs/storage/), as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-@NgModule({
- declarations: [AppComponent],
- entryComponents: [],
- imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
- IonicStorageModule.forRoot()
- ],
- providers: [
- StatusBar,
- SplashScreen,
- Camera,
- { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
- ],
- bootstrap: [AppComponent]
-})
-export class AppModule {}
-```
-
-It’s now ready to be used in our PhotoService class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
-}, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
-}
-```
-
-Over in the Tab2 page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the Tab2 page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Next up, we’ll look at how to apply a custom theme to an Ionic app.
-
-
-
- Continue{' '}
-
-
-
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/intro.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v4/intro.mdx
deleted file mode 100644
index 7916776c975..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/intro.mdx
+++ /dev/null
@@ -1,97 +0,0 @@
-# Your First Ionic App: Angular
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Note that all code referenced in this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4/).
-
-## Required Tools
-
-Download/install these right away to ensure an optimal Ionic development experience:
-
-- [Git](https://git-scm.com/downloads) for version control.
-- SSH client, such as [PuTTy](https://putty.software/), for secure login to Appflow.
-- Node.js for interacting with the Ionic ecosystem. [Download the LTS version here](https://nodejs.org/en/).
-- A code editor for... writing code! We are fans of [Visual Studio Code](https://code.visualstudio.com/).
-- Command-line terminal (CLI): FYI Windows users, for the best Ionic experience, we
- recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode. For
- Mac/Linux
- users, virtually any terminal will work.
-
-## Install Ionic and Cordova
-
-Run the following in the command line:
-
-```shell
-npm install -g @ionic/cli cordova
-```
-
-:::note
-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. See [Resolving Permission Errors](../../../developing/tips.mdx#resolving-permission-errors) for more information.
-:::
-
-## Create an App
-
-Next, create an Ionic Angular app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-Next, change into the app folder:
-
-```shell
-cd photo-gallery
-```
-
-That’s it! Now for the fun part - let’s see the app in action.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs. Click on the Tab2 tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform this page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/app/tab2/tab2.page.html`. We see:
-
-```html
-
-
- Tab Two
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the Tab Two page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/app/tabs/tabs.page.html`. Change the label to “Gallery” and the icon name to “images”:
-
-```html
-
-
- Gallery
-
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to your iOS or Android device, then continue building the photo gallery.
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/ios-android-camera.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v4/ios-android-camera.mdx
deleted file mode 100644
index d5c4dfcb129..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/ios-android-camera.mdx
+++ /dev/null
@@ -1,154 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature.
-
-## Add Cordova iOS and Android Platforms
-
-Ionic leverages the open source [Cordova project](https://cordova.apache.org/docs/en/latest/guide/overview/) to provide native hardware support. We begin by adding the iOS and Android _platforms_ then will add specific _plugins_ like the Camera afterwards:
-
-```shell
-$ ionic cordova platform add ios
-$ ionic cordova platform add android
-```
-
-These commands will create a `config.xml` file, which is used to define Cordova iOS and Android settings. Cordova reads this file and applies each setting as it builds each native app binary.
-
-There are more steps to configure [iOS](../../../developing/ios.mdx) and [Android](../../../developing/android.mdx) native tooling.
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-Back in `tab2.page.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added, with a version number similar to the following:
-
-`"@awesome-cordova-plugins/camera": "^5.4.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device. For more info on how this works, read up on [Cordova](https://cordova.apache.org/docs/en/latest/guide/overview/) and [Ionic Native](https://ionicframework.com/docs/native).
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-The `config.xml` file is now updated with an entry similar to the following for the native camera code:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this inside the ios platform section () of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the Gallery page
-
-Our camera button doesn’t do anything yet. Over in `tab2.page.html`, add a click handler to the button:
-
-```html
-
-
-
-
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `tab2.page.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-}
-```
-
-Finally, add the “takePicture” method in `tab2.page.ts`. It is already wired up to execute once the camera button has been tapped:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-
- takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- };
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-}
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere. 😀
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Next, we’ll look at how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/theming.mdx b/versioned_docs/version-v6/developer-resources/guides/first-app-v4/theming.mdx
deleted file mode 100644
index c55d591b308..00000000000
--- a/versioned_docs/version-v6/developer-resources/guides/first-app-v4/theming.mdx
+++ /dev/null
@@ -1,56 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box.
-
-Ionic has nine default colors, defined as CSS variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base, contrast, shade, and tint properties. These provide flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```css
-/** Ionic CSS Variables **/
-:root {
- /** primary **/
- --ion-color-primary: #b36bff;
- --ion-color-primary-rgb: 179, 107, 255;
- --ion-color-primary-contrast: #000000;
- --ion-color-primary-contrast-rgb: 0, 0, 0;
- --ion-color-primary-shade: #9e5ee0;
- --ion-color-primary-tint: #bb7aff;
-}
-```
-
-The easiest and most powerful way to create custom color palettes for your app’s UI is Ionic's [Color Generator tool](../../../theming/color-generator.mdx). As you change a color’s hex values, the embedded demo app automatically reflects the new colors. When you've finished making changes, simply copy and paste the generated code directly into your Ionic project.
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot({
- mode: "md"
- }),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with CSS variables and platform-specific styling. You now have everything you need to get started with Ionic.
-
-Go forth and build great apps!
diff --git a/versioned_docs/version-v6/developer-resources/posts.mdx b/versioned_docs/version-v6/developer-resources/posts.mdx
deleted file mode 100644
index a8c5b3f861c..00000000000
--- a/versioned_docs/version-v6/developer-resources/posts.mdx
+++ /dev/null
@@ -1,77 +0,0 @@
----
-sidebar_label: Posts
----
-
-# Community Posts
-
-### [What's new in Ionic 5 - Migration and Free Starter](https://ionicthemes.com/tutorials/about/ionic5-tutorial-migration-and-starter)
-
-Take advantage of the new benefits from Ionic 5. In this guide we describe the main changes and show you how to migrate your applications from Ionic 4 to Ionic 5. For this post we created an Ionic 5 CRUD Contacts app that you can download for free to learn how to start using Ionic 5.
-
-### [Ionic Navigation and Angular Routing](https://ionicthemes.com/tutorials/about/ionic-navigation-and-routing-ultimate-guide)
-
-Learn how to master Routing and Navigation in Ionic Angular Apps as well as some usability tricks you can add to your apps to improve the user experience!
-
-### [Firebase Authentication Tutorial For Ionic Apps](https://ionicthemes.com/tutorials/about/firebase-authentication-in-ionic-framework-apps)
-
-Learn how to add Firebase Authentication to your Ionic 5 App. This tutorial explains step by step how to configure both the Firebase and the Ionic Apps to enable authentication with social providers such as Google, Facebook and Twitter and also with Email and Password.
-
-### [Native Cross Platform Web Apps with Ionic Capacitor](https://ionicthemes.com/tutorials/about/native-cross-platform-web-apps-with-ionic-capacitor)
-
-Ionic Capacitor introduction guide for beginners: history, motivation, usage and how to migrate your existing Cordova apps to Capacitor.
-
-### [Ionic Skeleton Loading Screens](https://ionicthemes.com/tutorials/about/improved-ux-for-ionic-apps-with-skeleton-loading-screens)
-
-UI Skeletons, Ghost Elements, Shell Elements? They are all the same! Think of them as cool content placeholders that are shown where the content will eventually be once it becomes available. In this guide you will learn the importance of adopting the App Shell pattern in your ionic apps and discuss how to implement it using Ionic and Angular. Also, we explain some advanced CSS techniques to take the UX to the next level.
-
-### [The Complete Guide To Progressive Web Apps with Ionic](https://ionicthemes.com/tutorials/about/the-complete-guide-to-progressive-web-apps-with-ionic4)
-
-Learn what Progressive Web Apps are, why you should consider them for your next project, and how easy is to build a complete and production ready PWA with Ionic.
-
-### [Mastering Web Components in Ionic](https://ionicthemes.com/tutorials/about/ionic-4-tutorial-mastering-web-components-in-ionic-4)
-
-Understanding the new component architecture in Ionic, including web components, shadow DOM, CSS 4 variables and Stencil.
-
-### [Forms and Validations in Ionic 5](https://ionicthemes.com/tutorials/about/forms-and-validation-in-ionic)
-
-Learn everything about Ionic Forms and input validations in Ionic Angular apps.
-
-### [Building a Ionic Firebase App step by step](https://ionicthemes.com/tutorials/about/building-a-ionic-firebase-app-step-by-step)
-
-Learn how to make a CRUD application using Ionic Framework, Cloud Firestore for the database, and Cloud Storage for image storage.
-
-### [Ionic and WordPress Integration using the WordPress REST API](https://ionicthemes.com/tutorials/about/ionic-wordpress-integration)
-
-Learn how to connect your Ionic app with your WordPress site using the WordPress REST API.
-
-### [Understanding Ionic 2: Imports](http://mcgivery.com/understanding-ionic-2-imports/)
-
-ES6/TS introduce a new way to bring in external code. Learn about Imports.
-
-### [Ionic 2 / Angular 2 Concepts](https://www.joshmorony.com/ionic-2-first-look-series-new-angular-2-concepts-syntax/)
-
-Familiarize yourself with some of the new concepts in Ionic 2 and Angular 2.
-
-### [Ionic, PouchDB, & SQLite For Storage](http://gonehybrid.com/how-to-use-pouchdb-sqlite-for-local-storage-in-ionic-2/)
-
-Simplify storage using PouchDB and Sqlite.
-
-### [Advanced Google Maps](https://www.joshmorony.com/creating-an-advanced-google-maps-component-in-ionic-2/)
-
-Go beyond adding a simple map to handling offline conditions and complex maps.
-
-### [Background Geolocation](https://www.joshmorony.com/adding-background-geolocation-to-an-ionic-2-application/)
-
-Learn how to add geolocation that can run in the background of your app.
-
-### [Taking Advantage of Observables](https://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html)
-
-Learn how to use observables in your Ionic 2 app.
-
-### [Using the Angular Router in ionic/angular 4](https://www.joshmorony.com/using-angular-routing-with-ionic-4/)
-
-Learn how to use the Angular Router in your `@ionic/angular` 4 app.
-
-### [Ionic 4 examples using Angular, Vue and React](https://ionicworkshop.com/posts/introduction-to-ionic-framework-angular-vue-react/)
-
-Learn how to use Ionic 4 with Angular, React and Vue.
diff --git a/versioned_docs/version-v6/developer-resources/tools.mdx b/versioned_docs/version-v6/developer-resources/tools.mdx
deleted file mode 100644
index aa1a7301ba9..00000000000
--- a/versioned_docs/version-v6/developer-resources/tools.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Tools
-
-### [Angular CLI](https://github.com/angular/angular-cli)
-
-Learn more about the power of the Angular CLI
-
-### [StackBlitz](https://stackblitz.com/)
-
-Quickly get started with a new Ionic app entirely in the browser!
-
-### [TypeScript](https://www.typescriptlang.org/)
-
-Check out the features that make working with TypeScript amazing.
-
-### [Glossary](../reference/glossary.mdx)
-
-A list of common terms you'll see while developing in Ionic.
-
-### [Starter Apps](https://ionicthemes.com)
-
-Ionic Starter Apps to speed up and improve your app development.
diff --git a/versioned_docs/version-v6/developer-resources/videos.mdx b/versioned_docs/version-v6/developer-resources/videos.mdx
deleted file mode 100644
index bdc0a784d25..00000000000
--- a/versioned_docs/version-v6/developer-resources/videos.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Videos
-
-### [Ionic 2 Crash Course](https://www.youtube.com/watch?v=O2WiI9QrS5s&feature=youtu.be)
-
-A quick introduction to Ionic 2 and how to build your first app.
-
-### [Ionic & Async](https://blog.ionicframework.com/screencast-ionic-async/)
-
-Learn how to coordinate multiple events in a timely manner.
-
-### [Building a TODO app in Ionic 2](http://www.joshmorony.com/build-a-todo-app-from-scratch-with-ionic-2-video-tutorial/)
-
-Learn how to build out an entire Ionic 2 app.
-
-### [Angular Connect: Ionic 2](https://www.youtube.com/watch?v=bAlydPwFONY)
-
-Dive into some of the ideas and goals behind Ionic 2.
-
-### [Ionic & Typings](https://blog.ionicframework.com/ionic-and-typings/)
-
-Learn how to add typings for libraries you are using in your Ionic 2 app.
diff --git a/versioned_docs/version-v6/intro/first-app.mdx b/versioned_docs/version-v6/intro/first-app.mdx
deleted file mode 100644
index 3fc9be2b1fd..00000000000
--- a/versioned_docs/version-v6/intro/first-app.mdx
+++ /dev/null
@@ -1,24 +0,0 @@
----
-hide_table_of_contents: true
----
-
-import DocsCard from '@components/global/DocsCard';
-import DocsCards from '@components/global/DocsCards';
-
-# Build Your First App Tutorial
-
-Pick the JavaScript framework you plan to use while building your Ionic app:
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Angular.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with React.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Vue.
-
-
diff --git a/versioned_docs/version-v6/test/page1.mdx b/versioned_docs/version-v6/test/page1.mdx
deleted file mode 100644
index cd5b72410d0..00000000000
--- a/versioned_docs/version-v6/test/page1.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 1
-
-This is Testing page 1, Get to Testing Page 2 [here](page2.mdx).
diff --git a/versioned_docs/version-v6/test/page2.mdx b/versioned_docs/version-v6/test/page2.mdx
deleted file mode 100644
index 5ebdef8dca0..00000000000
--- a/versioned_docs/version-v6/test/page2.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 2
-
-This is Testing page 2, Get to Testing Page 1 [here](page1.mdx).
diff --git a/versioned_docs/version-v7/angular/your-first-app.mdx b/versioned_docs/version-v7/angular/your-first-app.mdx
index 0865ab0a747..c7a8c5b8a4c 100644
--- a/versioned_docs/version-v7/angular/your-first-app.mdx
+++ b/versioned_docs/version-v7/angular/your-first-app.mdx
@@ -24,10 +24,6 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-:::note
-Looking for the previous version of this guide that covered Ionic 4 and Cordova? [See here.](../developer-resources/guides/first-app-v4/intro.mdx)
-:::
-
## What We'll Build
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
diff --git a/versioned_docs/version-v7/developer-resources/courses.mdx b/versioned_docs/version-v7/developer-resources/courses.mdx
deleted file mode 100644
index 568f0fc05a4..00000000000
--- a/versioned_docs/version-v7/developer-resources/courses.mdx
+++ /dev/null
@@ -1,107 +0,0 @@
-# Courses
-
-### [Elite Ionic](https://www.joshmorony.com/elite/)
-
-{/* cspell:disable-next-line */}
-
-by Josh Morony
-
-Elite Ionic is an online course for Ionic developers who want to move past the basics, and build complex, well tested, high performing, beautiful, and useable mobile applications. It is recommended that you already have a reasonably solid understanding of the basics of Ionic before starting this course.
-
-### [Ionic Academy](https://ionicacademy.com/)
-
-{/* cspell:disable-next-line */}
-
-by Simon Grimm
-
-Learn Ionic with step-by-step video courses & quick wins from one of the Ionic community leaders. Covers beginner, intermediate and advanced topics. Get access to a community of developers just like you.
-
-### [Ionic Framework: Tips, Tricks & Techniques](https://www.packtpub.com/mobile/ionic-framework-tips-tricks-and-techniques-video)
-
-{/* cspell:disable-next-line */}
-
-by Charles Muzonzini
-
-In this course, you will master tips and best practices for Ionic 4 & Ionic 5 that you can immediately implement to build high quality apps. This course covers a wide variety of topics from increasing app performance, to building custom native plugins, to securing your apps. It's a practical, hands-on course that will take your app building skills to the next level.
-
-### [Building Desktop Apps with Ionic and Electron](https://pluralsight.pxf.io/VeMXO)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Desktop development has historically required dramatically different skills than those required for web
-development. The two disciplines don't mesh well. In this course, Building Desktop Apps with Ionic and Electron,
-you will gain the ability to apply your hard-earned web development skills to build amazing desktop
-applications. First, you will learn how to build a functional and attractive UI with Ionic and Angular. Next,
-you will discover how to wrap that UI into an Electron application shell. Finally, you will explore how to
-package your app and make it ready for distribution. When you are finished with this course, you will have the
-skills and knowledge of Ionic and Electron development needed to deploy and distribute a beautiful app to both
-Windows and macOS users.
-
-### [Building Progressive Web Apps with Ionic](https://pluralsight.pxf.io/Ly2EY)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Everything changed when Google created the concept of Progressive Web Applications or PWA. A PWA is a pure web
-application that you can install on devices, that can function with limited network functionality, through its
-use of intelligent caching. Build a Progressive Web App that will run anywhere. In this course, Building
-Progressive Web Apps with Ionic, you will learn foundational knowledge and gain the ability to create a web
-application that will run anywhere: the browser, desktop, or mobile clients. First, you will learn what a
-Progressive Web App (or PWA) is. Next, you will discover how to use the Ionic Framework, Angular, and Firebase
-to create, deploy, and optimize a basic web application into a full-blown PWA. Finally, you will explore how to
-configure the application to make it installable and runnable on Androids and iPhones. When you’re finished with
-this course, you will have the skills and knowledge of Ionic and PWAs needed to create and deploy your own
-Progressive Web Application anywhere you desire.
-
-### [Ionic CLI](https://pluralsight.pxf.io/ionic-cli)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Since its inception, the Ionic Framework has included a rudimentary command line interface. Though only a few
-years old, it has matured into a powerful tool that should be part of every developer’s toolbox. This course,
-Ionic CLI, will start at the top and explore the Ionic CLI. First, you'll see how to create projects and
-components. Next, you will learn how to build and serve apps. Finally, you'll discover how to share projects
-with others, and even integrate with other build tools. Whether you’re just starting to explore Ionic, or have
-been using it since its pre-beta days, there is something here for you. By the end of the course, you’ll have
-the confidence to use the Ionic CLI as part of your everyday Ionic development.
-
-### [Wordpress Rest API and Ionic 4 (Angular) App With Auth](https://www.udemy.com/course/wordpress-rest-api-and-ionic-3-crud/)
-
-{/* cspell:disable-next-line */}
-
-by Baljeet Singh at Udemy
-
-### [Building Mobile Apps with Ionic 2, Angular 2, and TypeScript](https://app.pluralsight.com/library/courses/ionic2-angular2-typescript-mobile-apps/table-of-contents)
-
-{/* cspell:disable-next-line */}
-
-by Pluralsight
-
-### [Introducing Ionic 2](http://shop.oreilly.com/product/0636920050353.do)
-
-{/* cspell:disable-next-line */}
-
-by Mathieu Chauvinc
-
-### [Ionic 2 Master Course](https://www.udemy.com/ionic-2-tutorial/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Introducing Ionic 2](https://www.udemy.com/introducing-ionic-2/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Ionic 2 Solutions](https://www.packtpub.com/web-development/ionic-2-solutions-video)
-
-{/* cspell:disable-next-line */}
-
-by Hoc Phan
diff --git a/versioned_docs/version-v7/developer-resources/guides.mdx b/versioned_docs/version-v7/developer-resources/guides.mdx
deleted file mode 100644
index c0590b83684..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
-# Guides
-
-### [Your First Ionic App - v3](guides/first-app-v3/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v3 and Appflow.
-
-### [Your First Ionic 4 App - Angular and Cordova](guides/first-app-v4/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v4 and Cordova.
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 7887f03a320..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,195 +0,0 @@
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the About page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this in [the part 2 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part2) on GitHub.
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g provider PhotoProvider
-```
-
-This creates a PhotoProvider class in a dedicated providers/photo folder:
-
-```Javascript
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-
-/*
- Generated class for the PhotoProvider provider.
-
- See https://angular.io/guide/dependency-injection for more info on providers
- and Angular DI.
-*/
-@Injectable()
-export class PhotoProvider {
-
- constructor(public http: HttpClient) {
- console.log('Hello PhotoProvider Provider');
- }
-}
-```
-
-Within this class, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoProvider {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `about.ts`, import PhotoProvider:
-
-```Javascript
-import { PhotoProvider } from '../../providers/photo/photo';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoProvider) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera import, and the About page constructor. Also, remove references to HttpClient - we won’t be making any HTTP calls.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `about.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class AboutPage {
- constructor(public navCtrl: NavController, public photoService: PhotoProvider) { }
-}
-```
-
-Next, in `about.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (“col-6”), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoProvider’s `takePicture` method:
-
-```Html
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the Ionic Storage plugin, as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp),
- IonicStorageModule.forRoot()
- ],
-```
-
-It’s now ready to be used in our PhotoProvider class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
- }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
- });
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
- }
-```
-
-Over in the About page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the About page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “implemented photo gallery”
-git push ionic master
-```
-
-Next up, we’ll look at how to apply a custom theme to an Ionic app.
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/intro.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v3/intro.mdx
deleted file mode 100644
index 4d44434249f..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/intro.mdx
+++ /dev/null
@@ -1,117 +0,0 @@
-# Your First Ionic App - Framework v3
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Reference code for this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/).
-
-## Install Node.js
-
-If you don’t have Node.js installed already, [download the LTS version](https://nodejs.org/en/).
-
-## Install Ionic
-
-Run the following in the command line (you may need to prepend “sudo” on a Mac):
-
-```shell
-npm install -g @ionic/cli
-```
-
-## Create an App
-
-Next, create an Ionic app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-“Would you like to integrate your new app with Cordova to target native iOS and Android?”
-
-Type “y” and press Enter. Project setup may take a few moments.
-
-“Install the free Appflow SDK and connect your app?”
-
-Type “y” and press Enter. [Appflow](https://ionicframework.com/pro) is a powerful set of services and features built on top of the flagship Ionic Framework. This includes updating your app instantly (skipping the app store review process!), packaging apps in the cloud, and error monitoring.
-
-Log into your Ionic Account
-
-Sign in now to easily access awesome features like Live Deploys later in this tutorial.
-
-What would you like to do?
-
-Choose “Create a new app on Appflow.”
-
-Which git host would you like to use?
-
-Choose “Appflow.”
-
-“How would you like to connect to Appflow?”
-
-- Choose “Automatically setup a new SSH key pair for Appflow” if you haven’t used SSH before.
-- Choose “Use an existing SSH key pair” if you’ve used SSH before.
-
-Next, change into the app folder, then push your code to Appflow:
-
-```shell
-$ cd photo-gallery
-$ git push ionic master
-```
-
-That’s it! Now for the fun part - let’s see it in action.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs: “Home”, “About”, and “Contact.” Click on the About tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform the About page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/pages/about/about.html`. We see:
-
-```html
-
-
- About
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with “About” as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the About page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/pages/tabs/tabs.html`. Change the tabTitle to “Gallery” and the tabIcon to “images”:
-
-```html
-
-
-
-
-
-```
-
-Now, back up your changes to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “converting about page to photo gallery”
-$ git push ionic master
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to iOS and Android, then continue building the photo gallery.
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/ios-android-camera.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v3/ios-android-camera.mdx
deleted file mode 100644
index ff861040e51..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/ios-android-camera.mdx
+++ /dev/null
@@ -1,156 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature. Fortunately, Ionic provides a way to skip the frustration of dealing with native SDK installations: Ionic DevApp!
-
-The Ionic DevApp is a free app that makes it easy to run your Ionic app directly on your iOS or Android device. Download it here, then open on your device:
-
-
-
-
-
-
-
-
-Afterwards, open a terminal and navigate to your Ionic project. Execute the following:
-
-```shell
-ionic serve -c
-```
-
-In DevApp, you should now see the app appear. If it doesn't, or you have any issues throughout creating this app, [see here](https://ionicframework.com/docs/pro/devapp/).
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this in [the “part 1” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part1) on GitHub.
-
-Back in `about.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install --save @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added:
-
-`"@awesome-cordova-plugins/camera": "^4.12.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device:
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-In `config.xml`, a new plugin entry is created:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this to the bottom of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the About page
-
-Our camera button doesn’t do anything yet. Over in `about.html`, add a click handler to the button:
-
-```html
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `about.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class AboutPage {
- currentImage: any;
-
- constructor(public navCtrl: NavController, private camera: Camera) {
-}
-```
-
-Finally, add the “takePicture” method, already wired up to execute once the camera button has been tapped:
-
-```Javascript
-takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- }
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere `:)`
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “added camera functionality”
-git push ionic master
-```
-
-Next, we’ll look at how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
deleted file mode 100644
index 11e25a0a1fa..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
+++ /dev/null
@@ -1,193 +0,0 @@
-# Realtime App Updates with Appflow Live Updates
-
-As you’ve seen so far, building web and mobile apps is quick and easy with the Ionic Framework. However, nothing disrupts rapid iteration faster than App Store delays. Fortunately, with Appflow’s Deploy feature, you can send live code changes directly to your users. Paired with seamless background updates, they are always upgraded to the latest version.
-
-Setting it up is quick and easy. For reference, continue to refer to [the part 3 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub. First, install the Appflow JavaScript library:
-
-```shell
-npm install @ionic/pro@latest --save
-```
-
-Then, add the Appflow plugin. Here’s the command to install it:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=YOUR_APP_ID --variable CHANNEL_NAME=YOUR_CHANNEL_NAME
-```
-
-There are two unique values to provide: your app id and channel name. Sign into Appflow, then find the App Id on your app’s dashboard:
-
-
-
-And we’ll just use “Master” as the channel name. Putting this together looks like:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=381533B9 --variable CHANNEL_NAME=Master
-```
-
-After this plugin has been added, you’ll notice that `config.xml` and `package.json` have been updated with your app’s details:
-
-```xml
-
-
-
-
-
-
-
-
-
-```
-
-Next, modify `src/app/app.module.ts` to include the initialization of Appflow on app startup:
-
-```javascript
-import { Pro } from '@ionic/pro';
-
-Pro.init('YOUR_APP_ID', {
- appVersion: 'APP_VERSION',
-});
-```
-
-As an example, this would look like:
-
-```javascript
-Pro.init('381533B9', {
- appVersion: '0.0.1',
-});
-```
-
-Next, push the code up to Appflow:
-
-```shell
-git add .
-git commit -m “adding Appflow”
-git push ionic master
-```
-
-Next, create a local, native build of the app.
-
-## Android Builds
-
-Follow the [Android Setup instructions](../../../developing/android.mdx), which includes installing Java 8 and Android Studio on your machine. Then, in your Terminal run:
-
-```shell
-ionic cordova build android --prod
-```
-
-This will generate a unsigned debug build (meaning the app can run on any Android device).
-
-## iOS Builds
-
-iOS is [a bit trickier to set up](../../../developing/ios.mdx) than Android and requires a Mac computer. Ensure XCode is updated to the latest version and set up a development team. Then, in your Terminal, run:
-
-```shell
-ionic cordova build ios --prod
-```
-
-Then, continue to [follow the instructions here](../../../deployment/app-store.mdx) regarding signing certificates, etc. With a native version of your app built, let’s copy it to your device of choice.
-
-## Add the Native App to Your Local Device
-
-Now comes the fun part: testing out the native app on your device! For iOS, the easiest way (that works for both PC and Mac) involves using iTunes. Connect your iOS device, locate your IPA file, then drag and drop the IPA file from the file system onto your device in iTunes. The app will install immediately and be ready for use:
-
-
-
-
-
-
-
-
-For Android testing, the easiest way across all OS platforms is to use [Android Studio](https://developer.android.com/studio/), Google’s official Android IDE. After downloading it, connect your Android device to your computer. On the Studio startup screen, select “Profile or debug APK”, then select the recently built APK file.
-
-In the upper right hand corner, click the Play button. Select your connected device, then click OK:
-
-
-
-
-
-
-
-
-## Deploying Changes
-
-With Appflow Deploy, any JavaScript, HTML, or CSS changes can be pushed automatically to app users. Open the Photo Gallery app in your favorite code editor, then update the title of the Gallery page:
-
-```html
-
-
- Photo Viewer
-
-
-```
-
-Next, push the code up to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “change name to Photo Viewer”
-$ git push ionic master
-```
-
-Log into the [Appflow dashboard](https://dashboard.ionicframework.com) and navigate to Deploy -> Builds. You’ll see this newest commit begin to build immediately. Since we assigned the Appflow plugin to the Master branch (the one we always Git Push to), the Channel label will also point to this commit, effectively auto-deploying this change to all app users:
-
-
-
-A Channel points to a specific JavaScript Build or Snapshot of your app that will be shared with devices listening to that channel for updates. You can change which Build a Channel points to whenever you’d like.
-
-Each time a user launches our Photo Gallery app, it will poll for updates from Appflow. If new code is available, the update is downloaded in the background. There are [a handful of ways](https://ionic.io/docs/appflow/deploy/api#update_method) to control how updates are performed, but by default they will be applied the next time the user closes then opens the app.
-
-When the latest Build has been successful, close your local copy of Photo Gallery app or put it in the background for 30 seconds (the [MIN_BACKGROUND_DURATION default](https://ionic.io/docs/appflow/deploy/api#min_background_duration)), then reopen it. The title of the Photo Gallery page should change from “Photo Gallery” to “Photo Viewer.”
-
-What if you deploy a change, then realize that there is a bug? Or perhaps you’re just not happy with the name “Photo Viewer?” No problem: Appflow Deploy makes it easy to roll back changes as well!
-
-On the Deploy Builds page, click the “Assign to Channel” button on the previous commit, then click “Deploy.” App users will be reverted to the previous version, and our “Photo Gallery” name has been restored.
-
-
-
-This was just a taste of what you can do with Appflow Live Updates! You can also set up multiple deployment channels to send targeted updates to specific groups of users. Use it to run A/B tests, or target the distribution of updates by audience, geography, or test group.
-
-## Stuck on creating local native builds?
-
-Building native app binaries for Android and iOS can be painful. The tooling isn’t great, new OS versions often result in challenging upgrades, and creating consistent builds across your dev team can be frustrating. Fortunately, Appflow’s Package feature makes this easy: simply upload your iOS certificate and Android keystore files, then we take care of the rest!
-
-[Start packaging your app in the cloud](https://dashboard.ionicframework.com/settings/billing) along with 10,000 Ionic Deploys per month.
-
-Up next, we look at Appflow Monitoring - track your app errors in realtime.
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/theming.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v3/theming.mdx
deleted file mode 100644
index bc38fe59379..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/theming.mdx
+++ /dev/null
@@ -1,47 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box. You can find the code for this in [the “part 3” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub.
-
-Ionic has five default colors, defined as Sass variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base and contract property. Base acts as the background color and contrast acts as the text color for most components. This provides much more flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```Css
-$colors: (
- primary: #7044ff,
-)
-```
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp, {
- mode: "md"
- }, null),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with Sass variables and platform-specific styling. You now have everything you need to get started with Ionic. Go forth and build great apps!
-
-If you're interested in taking your Ionic apps to the next level, continue on with our exploration of Appflow next.
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
deleted file mode 100644
index 0417b953de6..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
+++ /dev/null
@@ -1,92 +0,0 @@
-# Track Bugs in Realtime with Ionic Monitoring
-
-Bugs happen, and can be hard to track down - especially with hundreds of possible combinations of mobile devices and operating systems. Appflow Monitoring allows you to track errors in your app on users’ phones and it sends them directly to you instantly, even if your code is minified!
-
-Reducing customer frustration by fixing major issues quickly in your production apps are a substantial part of providing a high quality app experience. Combined with Appflow Deploy, new updates can be rolled out quickly to address problems in real-time.
-
-To begin, let’s add a global error handler that will catch and report all unhandled exceptions that occur in the app. Open `src/app/app.module.ts`, then add two import statements:
-
-```javascript
-import { ErrorHandler, Injectable, Injector } from '@angular/core';
-import { IonicErrorHandler } from 'ionic-angular';
-```
-
-Next, create an error handler class calls the Monitoring service’s API whenever any errors have been encountered:
-
-```javascript
-@Injectable()
-export class MyErrorHandler implements ErrorHandler {
- ionicErrorHandler: IonicErrorHandler;
-
- constructor(injector: Injector) {
- try {
- this.ionicErrorHandler = injector.get(IonicErrorHandler);
- } catch (e) {
- // Unable to get the IonicErrorHandler provider, ensure
- // IonicErrorHandler has been added to the providers list below
- }
- }
-
- handleError(err: any): void {
- Pro.monitoring.handleNewError(err);
-
- this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
- }
-}
-```
-
-Then, within the providers array, update IonicErrorHandler to MyErrorHandler:
-
-```javascript
-{provide: ErrorHandler, useClass: MyErrorHandler},
-```
-
-It should then look like:
-
-```javascript
-providers: [
- // ...
- IonicErrorHandler,
- [{ provide: ErrorHandler, useClass: MyErrorHandler }],
-];
-```
-
-Next, let’s intentionally create a bug so we can demonstrate the power of Ionic Monitoring. Open `about.html` and rename the takePicture method to something that doesn’t exist, such as “takePhoto”:
-
-```html
-
-```
-
-With this change in place, anytime a user taps on the Camera button, an exception will be thrown and sent to Ionic’s Monitoring service.
-
-Last, we need to need to create a Source Map for your app. This file makes it easy for Monitoring to pinpoint problems by providing stack traces that map back to the original, unminified TypeScript code.
-
-Sync the current version of the app by running the following:
-
-```shell
-ionic monitoring syncmaps
-```
-
-With our intentional error in place, let’s try it out to see what happens. Run your app locally:
-
-```shell
-ionic serve
-```
-
-Tap on the Gallery tab, then the camera button. A runtime error should occur. In a browser, head over to the [Appflow dashboard](https://dashboard.ionicframework.com), then Monitor -> Monitoring. After a few minutes, the error should appear:
-
-
-
-Clicking on the event gives us lots of details surrounding what happened, such as a full stack trace. In this instance, we see that the error occurred three times on Mac OS X in the Chrome web browser.
-
-
-
-Given the proliferation of mobile devices and operating systems these days, this is immensely powerful. Armed with these details, we can hone in on the problem and fix it quickly.
-
-This is a TypeScript bug, meaning a fix can be released using Live Updates. Give it a try!
-
-- Revert the method back to “takePicture.”
-- Push the fix using Git. Remember, “git push ionic master.”
-- Roll out the fix using Live Updates from the Ionic dashboard.
-
-Supporting hundreds of mobile device types is so much easier with Appflow Monitoring. [Upgrade to the Appflow Developer plan today](https://dashboard.ionicframework.com/settings/billing) to get instant notification when bugs occur, save error history for sixty days (instead of seven), and unlock 10,000 live Deploy updates per month!
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 5e1d62fed1b..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,202 +0,0 @@
-import DocsButton from '@components/page/native/DocsButton';
-
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the Tab2 page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g service services/Photo
-```
-
-This creates a PhotoService class in a dedicated "services" folder:
-
-```Javascript
-import { Injectable } from '@angular/core';
-
-@Injectable({
- providedIn: 'root'
-})
-export class PhotoService {
- constructor() { }
-}
-```
-
-Within this file, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoService {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `tab2.page.ts`, import PhotoService:
-
-```Javascript
-import { PhotoService } from '../services/photo.service';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoService) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera and CameraOptions imports, and the Tab2Page page constructor.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `tab2.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class Tab2Page {
- constructor(public photoService: PhotoService) { }
-}
-```
-
-Next, in `tab2.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (`size="6"`), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoService’s `takePicture` method:
-
-```Html
-
-
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the [Ionic Storage plugin](https://ionicframework.com/docs/storage/), as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-@NgModule({
- declarations: [AppComponent],
- entryComponents: [],
- imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
- IonicStorageModule.forRoot()
- ],
- providers: [
- StatusBar,
- SplashScreen,
- Camera,
- { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
- ],
- bootstrap: [AppComponent]
-})
-export class AppModule {}
-```
-
-It’s now ready to be used in our PhotoService class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
-}, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
-}
-```
-
-Over in the Tab2 page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the Tab2 page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Next up, we’ll look at how to apply a custom theme to an Ionic app.
-
-
-
- Continue{' '}
-
-
-
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/intro.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v4/intro.mdx
deleted file mode 100644
index 00e9e11ad2c..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/intro.mdx
+++ /dev/null
@@ -1,97 +0,0 @@
-# Your First Ionic App: Angular
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Note that all code referenced in this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4/).
-
-## Required Tools
-
-Download/install these right away to ensure an optimal Ionic development experience:
-
-- [Git](https://git-scm.com/downloads) for version control.
-- SSH client, such as [PuTTy](https://putty.software/), for secure login to Appflow.
-- Node.js for interacting with the Ionic ecosystem. [Download the LTS version here](https://nodejs.org/en/).
-- A code editor for... writing code! We are fans of [Visual Studio Code](https://code.visualstudio.com/).
-- Command-line terminal (CLI): FYI Windows users, for the best Ionic experience, we
- recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode. For
- Mac/Linux
- users, virtually any terminal will work.
-
-## Install Ionic and Cordova
-
-Run the following in the command line:
-
-```shell
-npm install -g @ionic/cli cordova
-```
-
-:::note
-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. See [Resolving Permission Errors](../../../developing/tips.mdx#resolving-permission-errors) for more information.
-:::
-
-## Create an App
-
-Next, create an Ionic Angular app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-Next, change into the app folder:
-
-```shell
-cd photo-gallery
-```
-
-That’s it! Now for the fun part - let’s see the app in action.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs. Click on the Tab2 tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform this page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/app/tab2/tab2.page.html`. We see:
-
-```html
-
-
- Tab Two
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the Tab Two page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/app/tabs/tabs.page.html`. Change the label to “Gallery” and the icon name to “images”:
-
-```html
-
-
- Gallery
-
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to your iOS or Android device, then continue building the photo gallery.
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/ios-android-camera.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v4/ios-android-camera.mdx
deleted file mode 100644
index d5c4dfcb129..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/ios-android-camera.mdx
+++ /dev/null
@@ -1,154 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature.
-
-## Add Cordova iOS and Android Platforms
-
-Ionic leverages the open source [Cordova project](https://cordova.apache.org/docs/en/latest/guide/overview/) to provide native hardware support. We begin by adding the iOS and Android _platforms_ then will add specific _plugins_ like the Camera afterwards:
-
-```shell
-$ ionic cordova platform add ios
-$ ionic cordova platform add android
-```
-
-These commands will create a `config.xml` file, which is used to define Cordova iOS and Android settings. Cordova reads this file and applies each setting as it builds each native app binary.
-
-There are more steps to configure [iOS](../../../developing/ios.mdx) and [Android](../../../developing/android.mdx) native tooling.
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-Back in `tab2.page.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added, with a version number similar to the following:
-
-`"@awesome-cordova-plugins/camera": "^5.4.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device. For more info on how this works, read up on [Cordova](https://cordova.apache.org/docs/en/latest/guide/overview/) and [Ionic Native](https://ionicframework.com/docs/native).
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-The `config.xml` file is now updated with an entry similar to the following for the native camera code:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this inside the ios platform section () of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the Gallery page
-
-Our camera button doesn’t do anything yet. Over in `tab2.page.html`, add a click handler to the button:
-
-```html
-
-
-
-
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `tab2.page.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-}
-```
-
-Finally, add the “takePicture” method in `tab2.page.ts`. It is already wired up to execute once the camera button has been tapped:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-
- takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- };
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-}
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere. 😀
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Next, we’ll look at how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/theming.mdx b/versioned_docs/version-v7/developer-resources/guides/first-app-v4/theming.mdx
deleted file mode 100644
index c55d591b308..00000000000
--- a/versioned_docs/version-v7/developer-resources/guides/first-app-v4/theming.mdx
+++ /dev/null
@@ -1,56 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box.
-
-Ionic has nine default colors, defined as CSS variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base, contrast, shade, and tint properties. These provide flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```css
-/** Ionic CSS Variables **/
-:root {
- /** primary **/
- --ion-color-primary: #b36bff;
- --ion-color-primary-rgb: 179, 107, 255;
- --ion-color-primary-contrast: #000000;
- --ion-color-primary-contrast-rgb: 0, 0, 0;
- --ion-color-primary-shade: #9e5ee0;
- --ion-color-primary-tint: #bb7aff;
-}
-```
-
-The easiest and most powerful way to create custom color palettes for your app’s UI is Ionic's [Color Generator tool](../../../theming/color-generator.mdx). As you change a color’s hex values, the embedded demo app automatically reflects the new colors. When you've finished making changes, simply copy and paste the generated code directly into your Ionic project.
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot({
- mode: "md"
- }),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with CSS variables and platform-specific styling. You now have everything you need to get started with Ionic.
-
-Go forth and build great apps!
diff --git a/versioned_docs/version-v7/developer-resources/posts.mdx b/versioned_docs/version-v7/developer-resources/posts.mdx
deleted file mode 100644
index a8c5b3f861c..00000000000
--- a/versioned_docs/version-v7/developer-resources/posts.mdx
+++ /dev/null
@@ -1,77 +0,0 @@
----
-sidebar_label: Posts
----
-
-# Community Posts
-
-### [What's new in Ionic 5 - Migration and Free Starter](https://ionicthemes.com/tutorials/about/ionic5-tutorial-migration-and-starter)
-
-Take advantage of the new benefits from Ionic 5. In this guide we describe the main changes and show you how to migrate your applications from Ionic 4 to Ionic 5. For this post we created an Ionic 5 CRUD Contacts app that you can download for free to learn how to start using Ionic 5.
-
-### [Ionic Navigation and Angular Routing](https://ionicthemes.com/tutorials/about/ionic-navigation-and-routing-ultimate-guide)
-
-Learn how to master Routing and Navigation in Ionic Angular Apps as well as some usability tricks you can add to your apps to improve the user experience!
-
-### [Firebase Authentication Tutorial For Ionic Apps](https://ionicthemes.com/tutorials/about/firebase-authentication-in-ionic-framework-apps)
-
-Learn how to add Firebase Authentication to your Ionic 5 App. This tutorial explains step by step how to configure both the Firebase and the Ionic Apps to enable authentication with social providers such as Google, Facebook and Twitter and also with Email and Password.
-
-### [Native Cross Platform Web Apps with Ionic Capacitor](https://ionicthemes.com/tutorials/about/native-cross-platform-web-apps-with-ionic-capacitor)
-
-Ionic Capacitor introduction guide for beginners: history, motivation, usage and how to migrate your existing Cordova apps to Capacitor.
-
-### [Ionic Skeleton Loading Screens](https://ionicthemes.com/tutorials/about/improved-ux-for-ionic-apps-with-skeleton-loading-screens)
-
-UI Skeletons, Ghost Elements, Shell Elements? They are all the same! Think of them as cool content placeholders that are shown where the content will eventually be once it becomes available. In this guide you will learn the importance of adopting the App Shell pattern in your ionic apps and discuss how to implement it using Ionic and Angular. Also, we explain some advanced CSS techniques to take the UX to the next level.
-
-### [The Complete Guide To Progressive Web Apps with Ionic](https://ionicthemes.com/tutorials/about/the-complete-guide-to-progressive-web-apps-with-ionic4)
-
-Learn what Progressive Web Apps are, why you should consider them for your next project, and how easy is to build a complete and production ready PWA with Ionic.
-
-### [Mastering Web Components in Ionic](https://ionicthemes.com/tutorials/about/ionic-4-tutorial-mastering-web-components-in-ionic-4)
-
-Understanding the new component architecture in Ionic, including web components, shadow DOM, CSS 4 variables and Stencil.
-
-### [Forms and Validations in Ionic 5](https://ionicthemes.com/tutorials/about/forms-and-validation-in-ionic)
-
-Learn everything about Ionic Forms and input validations in Ionic Angular apps.
-
-### [Building a Ionic Firebase App step by step](https://ionicthemes.com/tutorials/about/building-a-ionic-firebase-app-step-by-step)
-
-Learn how to make a CRUD application using Ionic Framework, Cloud Firestore for the database, and Cloud Storage for image storage.
-
-### [Ionic and WordPress Integration using the WordPress REST API](https://ionicthemes.com/tutorials/about/ionic-wordpress-integration)
-
-Learn how to connect your Ionic app with your WordPress site using the WordPress REST API.
-
-### [Understanding Ionic 2: Imports](http://mcgivery.com/understanding-ionic-2-imports/)
-
-ES6/TS introduce a new way to bring in external code. Learn about Imports.
-
-### [Ionic 2 / Angular 2 Concepts](https://www.joshmorony.com/ionic-2-first-look-series-new-angular-2-concepts-syntax/)
-
-Familiarize yourself with some of the new concepts in Ionic 2 and Angular 2.
-
-### [Ionic, PouchDB, & SQLite For Storage](http://gonehybrid.com/how-to-use-pouchdb-sqlite-for-local-storage-in-ionic-2/)
-
-Simplify storage using PouchDB and Sqlite.
-
-### [Advanced Google Maps](https://www.joshmorony.com/creating-an-advanced-google-maps-component-in-ionic-2/)
-
-Go beyond adding a simple map to handling offline conditions and complex maps.
-
-### [Background Geolocation](https://www.joshmorony.com/adding-background-geolocation-to-an-ionic-2-application/)
-
-Learn how to add geolocation that can run in the background of your app.
-
-### [Taking Advantage of Observables](https://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html)
-
-Learn how to use observables in your Ionic 2 app.
-
-### [Using the Angular Router in ionic/angular 4](https://www.joshmorony.com/using-angular-routing-with-ionic-4/)
-
-Learn how to use the Angular Router in your `@ionic/angular` 4 app.
-
-### [Ionic 4 examples using Angular, Vue and React](https://ionicworkshop.com/posts/introduction-to-ionic-framework-angular-vue-react/)
-
-Learn how to use Ionic 4 with Angular, React and Vue.
diff --git a/versioned_docs/version-v7/developer-resources/tools.mdx b/versioned_docs/version-v7/developer-resources/tools.mdx
deleted file mode 100644
index aa1a7301ba9..00000000000
--- a/versioned_docs/version-v7/developer-resources/tools.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Tools
-
-### [Angular CLI](https://github.com/angular/angular-cli)
-
-Learn more about the power of the Angular CLI
-
-### [StackBlitz](https://stackblitz.com/)
-
-Quickly get started with a new Ionic app entirely in the browser!
-
-### [TypeScript](https://www.typescriptlang.org/)
-
-Check out the features that make working with TypeScript amazing.
-
-### [Glossary](../reference/glossary.mdx)
-
-A list of common terms you'll see while developing in Ionic.
-
-### [Starter Apps](https://ionicthemes.com)
-
-Ionic Starter Apps to speed up and improve your app development.
diff --git a/versioned_docs/version-v7/developer-resources/videos.mdx b/versioned_docs/version-v7/developer-resources/videos.mdx
deleted file mode 100644
index bdc0a784d25..00000000000
--- a/versioned_docs/version-v7/developer-resources/videos.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Videos
-
-### [Ionic 2 Crash Course](https://www.youtube.com/watch?v=O2WiI9QrS5s&feature=youtu.be)
-
-A quick introduction to Ionic 2 and how to build your first app.
-
-### [Ionic & Async](https://blog.ionicframework.com/screencast-ionic-async/)
-
-Learn how to coordinate multiple events in a timely manner.
-
-### [Building a TODO app in Ionic 2](http://www.joshmorony.com/build-a-todo-app-from-scratch-with-ionic-2-video-tutorial/)
-
-Learn how to build out an entire Ionic 2 app.
-
-### [Angular Connect: Ionic 2](https://www.youtube.com/watch?v=bAlydPwFONY)
-
-Dive into some of the ideas and goals behind Ionic 2.
-
-### [Ionic & Typings](https://blog.ionicframework.com/ionic-and-typings/)
-
-Learn how to add typings for libraries you are using in your Ionic 2 app.
diff --git a/versioned_docs/version-v7/intro/first-app.mdx b/versioned_docs/version-v7/intro/first-app.mdx
deleted file mode 100644
index 3fc9be2b1fd..00000000000
--- a/versioned_docs/version-v7/intro/first-app.mdx
+++ /dev/null
@@ -1,24 +0,0 @@
----
-hide_table_of_contents: true
----
-
-import DocsCard from '@components/global/DocsCard';
-import DocsCards from '@components/global/DocsCards';
-
-# Build Your First App Tutorial
-
-Pick the JavaScript framework you plan to use while building your Ionic app:
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Angular.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with React.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Vue.
-
-
diff --git a/versioned_docs/version-v7/test/page1.mdx b/versioned_docs/version-v7/test/page1.mdx
deleted file mode 100644
index cd5b72410d0..00000000000
--- a/versioned_docs/version-v7/test/page1.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 1
-
-This is Testing page 1, Get to Testing Page 2 [here](page2.mdx).
diff --git a/versioned_docs/version-v7/test/page2.mdx b/versioned_docs/version-v7/test/page2.mdx
deleted file mode 100644
index 5ebdef8dca0..00000000000
--- a/versioned_docs/version-v7/test/page2.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 2
-
-This is Testing page 2, Get to Testing Page 1 [here](page1.mdx).
diff --git a/versioned_docs/version-v8/angular/your-first-app.mdx b/versioned_docs/version-v8/angular/your-first-app.mdx
index 4b38c246a42..8343b0cdb42 100644
--- a/versioned_docs/version-v8/angular/your-first-app.mdx
+++ b/versioned_docs/version-v8/angular/your-first-app.mdx
@@ -24,12 +24,6 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-:::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.mdx).
-
-:::
-
## What We'll Build
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
diff --git a/versioned_docs/version-v8/developer-resources/courses.mdx b/versioned_docs/version-v8/developer-resources/courses.mdx
deleted file mode 100644
index f95f4f3c18a..00000000000
--- a/versioned_docs/version-v8/developer-resources/courses.mdx
+++ /dev/null
@@ -1,107 +0,0 @@
-# Courses
-
-### [Elite Ionic](https://www.joshmorony.com/elite/)
-
-{/* cspell:disable-next-line */}
-
-by Josh Morony
-
-Elite Ionic is an online course for Ionic developers who want to move past the basics, and build complex, well tested, high performing, beautiful, and useable mobile applications. It is recommended that you already have a reasonably solid understanding of the basics of Ionic before starting this course.
-
-### [Ionic Academy](https://ionicacademy.com/)
-
-{/* cspell:disable-next-line */}
-
-by Simon Grimm
-
-Learn Ionic with step-by-step video courses & quick wins from one of the Ionic community leaders. Covers beginner, intermediate and advanced topics. Get access to a community of developers just like you.
-
-### [Ionic Framework: Tips, Tricks & Techniques](https://www.packtpub.com/mobile/ionic-framework-tips-tricks-and-techniques-video)
-
-{/* cspell:disable-next-line */}
-
-by Charles Muzonzini
-
-In this course, you will master tips and best practices for Ionic 4 & Ionic 5 that you can immediately implement to build high quality apps. This course covers a wide variety of topics from increasing app performance, to building custom native plugins, to securing your apps. It's a practical, hands-on course that will take your app building skills to the next level.
-
-### [Building Desktop Apps with Ionic and Electron](https://pluralsight.pxf.io/VeMXO)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Desktop development has historically required dramatically different skills than those required for web
-development. The two disciplines don't mesh well. In this course, Building Desktop Apps with Ionic and Electron,
-you will gain the ability to apply your hard-earned web development skills to build amazing desktop
-applications. First, you will learn how to build a functional and attractive UI with Ionic and Angular. Next,
-you will discover how to wrap that UI into an Electron application shell. Finally, you will explore how to
-package your app and make it ready for distribution. When you are finished with this course, you will have the
-skills and knowledge of Ionic and Electron development needed to deploy and distribute a beautiful app to both
-Windows and macOS users.
-
-### [Building Progressive Web Apps with Ionic](https://pluralsight.pxf.io/Ly2EY)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Everything changed when Google created the concept of Progressive Web Applications or PWA. A PWA is a pure web
-application that you can install on devices, that can function with limited network functionality, through its
-use of intelligent caching. Build a Progressive Web App that will run anywhere. In this course, Building
-Progressive Web Apps with Ionic, you will learn foundational knowledge and gain the ability to create a web
-application that will run anywhere: the browser, desktop, or mobile clients. First, you will learn what a
-Progressive Web App (or PWA) is. Next, you will discover how to use the Ionic Framework, Angular, and Firebase
-to create, deploy, and optimize a basic web application into a full-blown PWA. Finally, you will explore how to
-configure the application to make it installable and runnable on Androids and iPhones. When you’re finished with
-this course, you will have the skills and knowledge of Ionic and PWAs needed to create and deploy your own
-Progressive Web Application anywhere you desire.
-
-### [Ionic CLI](https://pluralsight.pxf.io/ionic-cli)
-
-{/* cspell:disable-next-line */}
-
-by Michael Callaghan at Pluralsight
-
-Since its inception, the Ionic Framework has included a rudimentary command line interface. Though only a few
-years old, it has matured into a powerful tool that should be part of every developer’s toolbox. This course,
-Ionic CLI, will start at the top and explore the Ionic CLI. First, you'll learn how to create projects and
-components. Next, you will learn how to build and serve apps. Finally, you'll discover how to share projects
-with others, and even integrate with other build tools. Whether you’re just starting to explore Ionic, or have
-been using it since its pre-beta days, there is something here for you. By the end of the course, you’ll have
-the confidence to use the Ionic CLI as part of your everyday Ionic development.
-
-### [Wordpress Rest API and Ionic 4 (Angular) App With Auth](https://www.udemy.com/course/wordpress-rest-api-and-ionic-3-crud/)
-
-{/* cspell:disable-next-line */}
-
-by Baljeet Singh at Udemy
-
-### [Building Mobile Apps with Ionic 2, Angular 2, and TypeScript](https://app.pluralsight.com/library/courses/ionic2-angular2-typescript-mobile-apps/table-of-contents)
-
-{/* cspell:disable-next-line */}
-
-by Pluralsight
-
-### [Introducing Ionic 2](http://shop.oreilly.com/product/0636920050353.do)
-
-{/* cspell:disable-next-line */}
-
-by Mathieu Chauvinc
-
-### [Ionic 2 Master Course](https://www.udemy.com/ionic-2-tutorial/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Introducing Ionic 2](https://www.udemy.com/introducing-ionic-2/)
-
-{/* cspell:disable-next-line */}
-
-by Udemy
-
-### [Ionic 2 Solutions](https://www.packtpub.com/web-development/ionic-2-solutions-video)
-
-{/* cspell:disable-next-line */}
-
-by Hoc Phan
diff --git a/versioned_docs/version-v8/developer-resources/guides.mdx b/versioned_docs/version-v8/developer-resources/guides.mdx
deleted file mode 100644
index c0590b83684..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides.mdx
+++ /dev/null
@@ -1,9 +0,0 @@
-# Guides
-
-### [Your First Ionic App - v3](guides/first-app-v3/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v3 and Appflow.
-
-### [Your First Ionic 4 App - Angular and Cordova](guides/first-app-v4/intro.mdx)
-
-Follow along as we create a working Photo Gallery app using Ionic Framework v4 and Cordova.
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index cc52ec5f895..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,195 +0,0 @@
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the About page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this in [the part 2 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part2) on GitHub.
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g provider PhotoProvider
-```
-
-This creates a PhotoProvider class in a dedicated providers/photo folder:
-
-```Javascript
-import { HttpClient } from '@angular/common/http';
-import { Injectable } from '@angular/core';
-
-/*
- Generated class for the PhotoProvider provider.
-
- See https://angular.io/guide/dependency-injection for more info on providers
- and Angular DI.
-*/
-@Injectable()
-export class PhotoProvider {
-
- constructor(public http: HttpClient) {
- console.log('Hello PhotoProvider Provider');
- }
-}
-```
-
-Within this class, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoProvider {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `about.ts`, import PhotoProvider:
-
-```Javascript
-import { PhotoProvider } from '../../providers/photo/photo';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoProvider) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera import, and the About page constructor. Also, remove references to HttpClient - we won’t be making any HTTP calls.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `about.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class AboutPage {
- constructor(public navCtrl: NavController, public photoService: PhotoProvider) { }
-}
-```
-
-Next, in `about.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (“col-6”), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoProvider’s `takePicture` method:
-
-```Html
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the Ionic Storage plugin, as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp),
- IonicStorageModule.forRoot()
- ],
-```
-
-It’s now ready to be used in our PhotoProvider class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
- }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
- });
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
- }
-```
-
-Over in the About page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the About page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “implemented photo gallery”
-git push ionic master
-```
-
-Next up, we’ll cover how to apply a custom theme to an Ionic app.
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/intro.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v3/intro.mdx
deleted file mode 100644
index 76a92a638ee..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/intro.mdx
+++ /dev/null
@@ -1,117 +0,0 @@
-# Your First Ionic App - Framework v3
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Reference code for this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/).
-
-## Install Node.js
-
-If you don’t have Node.js installed already, [download the LTS version](https://nodejs.org/en/).
-
-## Install Ionic
-
-Run the following in the command line (you may need to prepend “sudo” on a Mac):
-
-```shell
-npm install -g @ionic/cli
-```
-
-## Create an App
-
-Next, create an Ionic app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-**“Would you like to integrate your new app with Cordova to target native iOS and Android?”**
-
-Type “y” and press Enter. Project setup may take a few moments.
-
-**“Install the free Appflow SDK and connect your app?”**
-
-Type “y” and press Enter. [Appflow](https://ionicframework.com/pro) is a powerful set of services and features built on top of the flagship Ionic Framework. This includes updating your app instantly (skipping the app store review process!), packaging apps in the cloud, and error monitoring.
-
-**Log into your Ionic Account**
-
-Sign in now to easily access awesome features like Live Deploys later in this tutorial.
-
-**What would you like to do?**
-
-Choose “Create a new app on Appflow.”
-
-**Which git host would you like to use?**
-
-Choose “Appflow.”
-
-**“How would you like to connect to Appflow?”**
-
-- Choose “Automatically setup a new SSH key pair for Appflow” if you haven’t used SSH before.
-- Choose “Use an existing SSH key pair” if you’ve used SSH before.
-
-Next, change into the app folder, then push your code to Appflow:
-
-```shell
-$ cd photo-gallery
-$ git push ionic master
-```
-
-That’s it! Now for the fun part - let’s run it.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs: “Home”, “About”, and “Contact.” Click on the About tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform the About page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/pages/about/about.html`. It contains:
-
-```html
-
-
- About
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with “About” as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the About page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/pages/tabs/tabs.html`. Change the tabTitle to “Gallery” and the tabIcon to “images”:
-
-```html
-
-
-
-
-
-```
-
-Now, back up your changes to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “converting about page to photo gallery”
-$ git push ionic master
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to iOS and Android, then continue building the photo gallery.
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/ios-android-camera.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v3/ios-android-camera.mdx
deleted file mode 100644
index 0d204a9f159..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/ios-android-camera.mdx
+++ /dev/null
@@ -1,156 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature. Fortunately, Ionic provides a way to skip the frustration of dealing with native SDK installations: Ionic DevApp!
-
-The Ionic DevApp is a free app that makes it easy to run your Ionic app directly on your iOS or Android device. Download it here, then open on your device:
-
-
-
-
-
-
-
-
-Afterwards, open a terminal and navigate to your Ionic project. Execute the following:
-
-```shell
-ionic serve -c
-```
-
-In DevApp, the app should now appear. If it doesn't, or you have any issues throughout creating this app, refer to the [DevApp documentation](https://ionicframework.com/docs/pro/devapp/).
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this in [the “part 1” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part1) on GitHub.
-
-Back in `about.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install --save @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added:
-
-`"@awesome-cordova-plugins/camera": "^4.12.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device:
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-In `config.xml`, a new plugin entry is created:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this to the bottom of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the About page
-
-Our camera button doesn’t do anything yet. Over in `about.html`, add a click handler to the button:
-
-```html
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `about.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class AboutPage {
- currentImage: any;
-
- constructor(public navCtrl: NavController, private camera: Camera) {
-}
-```
-
-Finally, add the “takePicture” method, already wired up to execute once the camera button has been tapped:
-
-```Javascript
-takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- }
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere `:)`
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Finally, back up your changes to Appflow:
-
-```shell
-git add .
-git commit -m “added camera functionality”
-git push ionic master
-```
-
-Next, we’ll cover how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
deleted file mode 100644
index ff1d1fcff85..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/realtime-updates-ionic-deploy.mdx
+++ /dev/null
@@ -1,193 +0,0 @@
-# Realtime App Updates with Appflow Live Updates
-
-As demonstrated so far, building web and mobile apps is quick and easy with the Ionic Framework. However, nothing disrupts rapid iteration faster than App Store delays. Fortunately, with Appflow’s Deploy feature, you can send live code changes directly to your users. Paired with seamless background updates, they are always upgraded to the latest version.
-
-Setting it up is quick and easy. For reference, continue to refer to [the part 3 folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub. First, install the Appflow JavaScript library:
-
-```shell
-npm install @ionic/pro@latest --save
-```
-
-Then, add the Appflow plugin. Here’s the command to install it:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=YOUR_APP_ID --variable CHANNEL_NAME=YOUR_CHANNEL_NAME
-```
-
-There are two unique values to provide: your app id and channel name. Sign into Appflow, then find the App Id on your app’s dashboard:
-
-
-
-And we’ll just use “Master” as the channel name. Putting this together looks like:
-
-```shell
-$ ionic cordova plugin add cordova-plugin-ionic@latest --save
---variable APP_ID=381533B9 --variable CHANNEL_NAME=Master
-```
-
-After this plugin has been added, you’ll notice that `config.xml` and `package.json` have been updated with your app’s details:
-
-```xml
-
-
-
-
-
-
-
-
-
-```
-
-Next, modify `src/app/app.module.ts` to include the initialization of Appflow on app startup:
-
-```javascript
-import { Pro } from '@ionic/pro';
-
-Pro.init('YOUR_APP_ID', {
- appVersion: 'APP_VERSION',
-});
-```
-
-As an example, this would look like:
-
-```javascript
-Pro.init('381533B9', {
- appVersion: '0.0.1',
-});
-```
-
-Next, push the code up to Appflow:
-
-```shell
-git add .
-git commit -m “adding Appflow”
-git push ionic master
-```
-
-Next, create a local, native build of the app.
-
-## Android Builds
-
-Follow the [Android Setup instructions](../../../developing/android.mdx), which includes installing Java 8 and Android Studio on your machine. Then, in your Terminal run:
-
-```shell
-ionic cordova build android --prod
-```
-
-This will generate a unsigned debug build (meaning the app can run on any Android device).
-
-## iOS Builds
-
-iOS is [a bit trickier to set up](../../../developing/ios.mdx) than Android and requires a Mac computer. Ensure XCode is updated to the latest version and set up a development team. Then, in your Terminal, run:
-
-```shell
-ionic cordova build ios --prod
-```
-
-Then, continue to follow the [app store deployment instructions](../../../deployment/app-store.mdx) regarding signing certificates, etc. With a native version of your app built, let’s copy it to your device of choice.
-
-## Add the Native App to Your Local Device
-
-Now comes the fun part: testing out the native app on your device! For iOS, the easiest way (that works for both PC and Mac) involves using iTunes. Connect your iOS device, locate your IPA file, then drag and drop the IPA file from the file system onto your device in iTunes. The app will install immediately and be ready for use:
-
-
-
-
-
-
-
-
-For Android testing, the easiest way across all OS platforms is to use [Android Studio](https://developer.android.com/studio/), Google’s official Android IDE. After downloading it, connect your Android device to your computer. On the Studio startup screen, select “Profile or debug APK”, then select the recently built APK file.
-
-In the upper right hand corner, click the Play button. Select your connected device, then click OK:
-
-
-
-
-
-
-
-
-## Deploying Changes
-
-With Appflow Deploy, any JavaScript, HTML, or CSS changes can be pushed automatically to app users. Open the Photo Gallery app in your favorite code editor, then update the title of the Gallery page:
-
-```html
-
-
- Photo Viewer
-
-
-```
-
-Next, push the code up to Appflow:
-
-```shell
-$ git add .
-$ git commit -m “change name to Photo Viewer”
-$ git push ionic master
-```
-
-Log into the [Appflow dashboard](https://dashboard.ionicframework.com) and navigate to Deploy -> Builds. This newest commit begins to build immediately. Since we assigned the Appflow plugin to the Master branch (the one we always Git Push to), the Channel label will also point to this commit, effectively auto-deploying this change to all app users:
-
-
-
-A Channel points to a specific JavaScript Build or Snapshot of your app that will be shared with devices listening to that channel for updates. You can change which Build a Channel points to whenever you’d like.
-
-Each time a user launches our Photo Gallery app, it will poll for updates from Appflow. If new code is available, the update is downloaded in the background. There are [a handful of ways](https://ionic.io/docs/appflow/deploy/api#update_method) to control how updates are performed, but by default they will be applied the next time the user closes then opens the app.
-
-When the latest Build has been successful, close your local copy of Photo Gallery app or put it in the background for 30 seconds (the [MIN_BACKGROUND_DURATION default](https://ionic.io/docs/appflow/deploy/api#min_background_duration)), then reopen it. The title of the Photo Gallery page should change from “Photo Gallery” to “Photo Viewer.”
-
-What if you deploy a change, then realize that there is a bug? Or perhaps you’re just not happy with the name “Photo Viewer?” No problem: Appflow Deploy makes it easy to roll back changes as well!
-
-On the Deploy Builds page, click the “Assign to Channel” button on the previous commit, then click “Deploy.” App users will be reverted to the previous version, and our “Photo Gallery” name has been restored.
-
-
-
-This was just a taste of what you can do with Appflow Live Updates! You can also set up multiple deployment channels to send targeted updates to specific groups of users. Use it to run A/B tests, or target the distribution of updates by audience, geography, or test group.
-
-## Stuck on creating local native builds?
-
-Building native app binaries for Android and iOS can be painful. The tooling isn’t great, new OS versions often result in challenging upgrades, and creating consistent builds across your dev team can be frustrating. Fortunately, Appflow’s Package feature makes this easy: simply upload your iOS certificate and Android keystore files, then we take care of the rest!
-
-[Start packaging your app in the cloud](https://dashboard.ionicframework.com/settings/billing) along with 10,000 Ionic Deploys per month.
-
-Up next, we cover Appflow Monitoring - track your app errors in realtime.
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/theming.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v3/theming.mdx
deleted file mode 100644
index 077186843fc..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/theming.mdx
+++ /dev/null
@@ -1,47 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box. You can find the code for this in [the “part 3” folder](https://github.com/ionic-team/photo-gallery-tutorial-ionic3/tree/master/part3) on GitHub.
-
-Ionic has five default colors, defined as Sass variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base and contract property. Base acts as the background color and contrast acts as the text color for most components. This provides much more flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```Css
-$colors: (
- primary: #7044ff,
-)
-```
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot(MyApp, {
- mode: "md"
- }, null),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with Sass variables and platform-specific styling. You now have everything you need to get started with Ionic. Go forth and build great apps!
-
-If you're interested in taking your Ionic apps to the next level, continue on with our exploration of Appflow next.
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
deleted file mode 100644
index 858da2cc914..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v3/track-bugs-ionic-monitoring.mdx
+++ /dev/null
@@ -1,92 +0,0 @@
-# Track Bugs in Realtime with Ionic Monitoring
-
-Bugs happen, and can be hard to track down - especially with hundreds of possible combinations of mobile devices and operating systems. Appflow Monitoring allows you to track errors in your app on users’ phones and it sends them directly to you instantly, even if your code is minified!
-
-Reducing customer frustration by fixing major issues quickly in your production apps are a substantial part of providing a high quality app experience. Combined with Appflow Deploy, new updates can be rolled out quickly to address problems in real-time.
-
-To begin, let’s add a global error handler that will catch and report all unhandled exceptions that occur in the app. Open `src/app/app.module.ts`, then add two import statements:
-
-```javascript
-import { ErrorHandler, Injectable, Injector } from '@angular/core';
-import { IonicErrorHandler } from 'ionic-angular';
-```
-
-Next, create an error handler class calls the Monitoring service’s API whenever any errors have been encountered:
-
-```javascript
-@Injectable()
-export class MyErrorHandler implements ErrorHandler {
- ionicErrorHandler: IonicErrorHandler;
-
- constructor(injector: Injector) {
- try {
- this.ionicErrorHandler = injector.get(IonicErrorHandler);
- } catch (e) {
- // Unable to get the IonicErrorHandler provider, ensure
- // IonicErrorHandler has been added to the providers list below
- }
- }
-
- handleError(err: any): void {
- Pro.monitoring.handleNewError(err);
-
- this.ionicErrorHandler && this.ionicErrorHandler.handleError(err);
- }
-}
-```
-
-Then, within the providers array, update IonicErrorHandler to MyErrorHandler:
-
-```javascript
-{provide: ErrorHandler, useClass: MyErrorHandler},
-```
-
-It should then look like:
-
-```javascript
-providers: [
- // ...
- IonicErrorHandler,
- [{ provide: ErrorHandler, useClass: MyErrorHandler }],
-];
-```
-
-Next, let’s intentionally create a bug so we can demonstrate the power of Ionic Monitoring. Open `about.html` and rename the takePicture method to something that doesn’t exist, such as “takePhoto”:
-
-```html
-
-```
-
-With this change in place, anytime a user taps on the Camera button, an exception will be thrown and sent to Ionic’s Monitoring service.
-
-Last, we need to need to create a Source Map for your app. This file makes it easy for Monitoring to pinpoint problems by providing stack traces that map back to the original, unminified TypeScript code.
-
-Sync the current version of the app by running the following:
-
-```shell
-ionic monitoring syncmaps
-```
-
-With our intentional error in place, let’s try it out to find out what happens. Run your app locally:
-
-```shell
-ionic serve
-```
-
-Tap on the Gallery tab, then the camera button. A runtime error should occur. In a browser, head over to the [Appflow dashboard](https://dashboard.ionicframework.com), then Monitor -> Monitoring. After a few minutes, the error should appear:
-
-
-
-Clicking on the event gives us lots of details surrounding what happened, such as a full stack trace. In this instance, the error occurred three times on Mac OS X in the Chrome web browser.
-
-
-
-Given the proliferation of mobile devices and operating systems these days, this is immensely powerful. Armed with these details, we can hone in on the problem and fix it quickly.
-
-This is a TypeScript bug, meaning a fix can be released using Live Updates. Give it a try!
-
-- Revert the method back to “takePicture.”
-- Push the fix using Git. Remember, “git push ionic master.”
-- Roll out the fix using Live Updates from the Ionic dashboard.
-
-Supporting hundreds of mobile device types is so much easier with Appflow Monitoring. [Upgrade to the Appflow Developer plan today](https://dashboard.ionicframework.com/settings/billing) to get instant notification when bugs occur, save error history for sixty days (instead of seven), and unlock 10,000 live Deploy updates per month!
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
deleted file mode 100644
index 5b70127be9c..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/creating-photo-gallery-device-storage.mdx
+++ /dev/null
@@ -1,202 +0,0 @@
-import DocsButton from '@components/page/native/DocsButton';
-
-# Creating a Photo Gallery with Device Storage
-
-Last time, we successfully added the Camera plugin to the Tab2 page of our Tabs app. Currently, the photo is replaced each time a new one is taken. What if we wanted to display multiple photos together? Let’s create a photo gallery. You can follow along with the complete code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-## Creating a Dedicated Photo Service
-
-From a terminal window, navigate to your Ionic project and run:
-
-```shell
-ionic g service services/Photo
-```
-
-This creates a PhotoService class in a dedicated "services" folder:
-
-```Javascript
-import { Injectable } from '@angular/core';
-
-@Injectable({
- providedIn: 'root'
-})
-export class PhotoService {
- constructor() { }
-}
-```
-
-Within this file, add a Photo class. The “data” property represents the base64 image data of a captured photo:
-
-```Javascript
-class Photo {
- data: any;
-}
-```
-
-Then, create a Photos array to represent our photo gallery:
-
-```Javascript
-export class PhotoService {
-
- public photos: Photo[] = [];
-
- constructor() { }
-}
-```
-
-Back in `tab2.page.ts`, import PhotoService:
-
-```Javascript
-import { PhotoService } from '../services/photo.service';
-```
-
-Add it to the Constructor:
-
-```Javascript
-constructor(private camera: Camera, public photoService: PhotoService) { }
-```
-
-Next, move all code pertaining to the Camera plugin to the PhotoService class. This includes the takePicture method, the Camera and CameraOptions imports, and the Tab2Page page constructor.
-
-Continuing on, we need to convert currentImage variable references to the new photos array. Start by adding the captured photo data into the photos array:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- }); }, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-In `tab2.page.ts`, remove the currentImage variable and the reference to Camera in the constructor, leaving only PhotoService:
-
-```Javascript
-export class Tab2Page {
- constructor(public photoService: PhotoService) { }
-}
-```
-
-Next, in `tab2.page.html`, remove the currentImage img tag. In its place, use an ion-grid component, which provides a great way to arrange elements on a page. In this case, we’ll use it to display 2 photos per row.
-
-```html
-
-
-
-
-
-
-
-```
-
-Here, we loop through each photo in the PhotoServices photos array, adding a new column for each. Since an ion-row consists of 12 “blocks” of space, and we’re setting the size to 6 (`size="6"`), only 2 photos are displayed per row.
-
-Last, update the Fab button to call the PhotoService’s `takePicture` method:
-
-```Html
-
-
-
-```
-
-Excellent! We now have a basic photo gallery working.
-
-## Saving photos to the device
-
-Having a working photo gallery is pretty cool, but you’ll likely notice that when the app is closed, the photos are lost forever. That’s no good, so let’s add the [Ionic Storage plugin](https://ionicframework.com/docs/storage/), as easy way to store key/value pairs and JSON objects. When running in a native app context, Storage will prioritize using SQLite, one of the most stable and widely used file-based databases. When running on the web or as a Progressive Web App, Storage will attempt to use IndexedDB, WebSQL, and localstorage, in that order.
-
-The Storage plugin works perfectly for our base64 image data. To begin, add the SQLite plugin for native:
-
-```shell
-ionic cordova plugin add cordova-sqlite-storage
-```
-
-Next, add the JavaScript library for the web:
-
-```shell
-npm install --save @ionic/storage
-```
-
-Last, import the Storage module and add it to the imports list in `app.module.ts`:
-
-```Javascript
-import { IonicStorageModule } from '@ionic/storage';
-
-@NgModule({
- declarations: [AppComponent],
- entryComponents: [],
- imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
- IonicStorageModule.forRoot()
- ],
- providers: [
- StatusBar,
- SplashScreen,
- Camera,
- { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
- ],
- bootstrap: [AppComponent]
-})
-export class AppModule {}
-```
-
-It’s now ready to be used in our PhotoService class. Import it:
-
-```Javascript
-import { Storage } from '@ionic/storage-angular';
-```
-
-Then inject it via the constructor:
-
-```Javascript
-constructor(private camera: Camera, private storage: Storage) { }
-```
-
-To add the capability to save photos, there’s only a couple steps left. Update the `takePicture()` method to save the entire photos array after each photo is taken using the storage.set method:
-
-```Javascript
-this.camera.getPicture(options).then((imageData) => {
- // Add new photo to gallery
- this.photos.unshift({
- data: 'data:image/jpeg;base64,' + imageData
- });
-
- // Save all photos for later viewing
- this.storage.set('photos', this.photos);
-}, (err) => {
- // Handle error
- console.log("Camera issue: " + err);
-});
-```
-
-We still need to load the saved photos when the app is first opened. This is simple enough - retrieve the “photos” key then assign its value to the photos array:
-
-```Javascript
-loadSaved() {
- this.storage.get('photos').then((photos) => {
- this.photos = photos || [];
- });
-}
-```
-
-Over in the Tab2 page, call the loadSaved method once it begins loading:
-
-```Javascript
-ngOnInit() {
- this.photoService.loadSaved();
-}
-```
-
-Sweet! Photos are now saved to your device. To demonstrate that they are indeed being saved, force close DevApp, reopen it, and open the Tab2 page. Or, shake your device to have the Control Menu pop up, then tap “Exit preview.” Afterwards, reload this app to view the photos.
-
-Next up, we’ll cover how to apply a custom theme to an Ionic app.
-
-
-
- Continue{' '}
-
-
-
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/intro.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v4/intro.mdx
deleted file mode 100644
index a2481a35344..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/intro.mdx
+++ /dev/null
@@ -1,97 +0,0 @@
-# Your First Ionic App: Angular
-
-The great thing about Ionic is that with one codebase, you can build for any platform using familiar web tools and languages. Follow along as we create a working Photo Gallery. Here’s the before and after:
-
-
-
-It’s easy to get started. Note that all code referenced in this guide can be [found on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4/).
-
-## Required Tools
-
-Download/install these right away to ensure an optimal Ionic development experience:
-
-- [Git](https://git-scm.com/downloads) for version control.
-- **SSH client**, such as [PuTTy](https://putty.software/), for secure login to Appflow.
-- **Node.js** for interacting with the Ionic ecosystem. [Download the LTS version](https://nodejs.org/en/).
-- **A code editor** for... writing code! We are fans of [Visual Studio Code](https://code.visualstudio.com/).
-- **Command-line terminal (CLI)**: FYI **Windows** users, for the best Ionic experience, we
- recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode. For **Mac/Linux** users, virtually any terminal will work.
-
-## Install Ionic and Cordova
-
-Run the following in the command line:
-
-```shell
-npm install -g @ionic/cli cordova
-```
-
-:::note
-
-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.mdx#resolving-permission-errors) for more information.
-
-:::
-
-## Create an App
-
-Next, create an Ionic Angular app using our “Tabs” app template:
-
-```shell
-ionic start photo-gallery tabs
-```
-
-This starter project comes complete with three pre-built pages and best practices for Ionic development. With common building blocks already in place, we can add more features easily!
-
-Next, change into the app folder:
-
-```shell
-cd photo-gallery
-```
-
-That’s it! Now for the fun part - let’s run the app.
-
-## Run the App
-
-Run this command next:
-
-```shell
-ionic serve
-```
-
-And voilà! Your Ionic app is now running in a web browser. Most of your app can be built right in the browser, greatly increasing development speed.
-
-## Photo Gallery!!!
-
-There are three tabs. Click on the Tab2 tab. It’s a blank canvas, aka the perfect spot to add camera functionality. Let’s begin to transform this page into a Photo Gallery. Ionic features LiveReload, so when you make changes and save them, the app is updated immediately!
-
-
-
-Open the photo-gallery app folder in your favorite code editor of choice, then navigate to `/src/app/tab2/tab2.page.html`. It contains:
-
-```html
-
-
- Tab Two
-
-
-
-
-```
-
-`ion-header` represents the top navigation and toolbar, with "Tab 2" as the title. We put our app code into `ion-content`. In this case, it’s where we’ll add a button that opens the device’s camera and shows the image captured by the camera. But first, let’s start with something obvious: renaming the Tab Two page:
-
-```html
-Photo Gallery
-```
-
-Next, open `src/app/tabs/tabs.page.html`. Change the label to “Gallery” and the icon name to “images”:
-
-```html
-
-
- Gallery
-
-```
-
-That’s just the start of all the cool things we can do with Ionic. Up next, we’ll deploy the app to your iOS or Android device, then continue building the photo gallery.
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/ios-android-camera.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v4/ios-android-camera.mdx
deleted file mode 100644
index 8e1c8b15d11..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/ios-android-camera.mdx
+++ /dev/null
@@ -1,154 +0,0 @@
-# Android, iOS, and the Camera - Oh My!
-
-Previously, we got an Ionic app up and running locally in a web browser. Now, let’s get it onto your iOS or Android device, then start building the photo gallery feature.
-
-## Add Cordova iOS and Android Platforms
-
-Ionic leverages the open source [Cordova project](https://cordova.apache.org/docs/en/latest/guide/overview/) to provide native hardware support. We begin by adding the iOS and Android _platforms_ then will add specific _plugins_ like the Camera afterwards:
-
-```shell
-$ ionic cordova platform add ios
-$ ionic cordova platform add android
-```
-
-These commands will create a `config.xml` file, which is used to define Cordova iOS and Android settings. Cordova reads this file and applies each setting as it builds each native app binary.
-
-There are more steps to configure [iOS](../../../developing/ios.mdx) and [Android](../../../developing/android.mdx) native tooling.
-
-Much better! Now we can add the camera functionality. By the way, you can find reference code for this [on GitHub](https://github.com/ionic-team/photo-gallery-tutorial-ionic4).
-
-Back in `tab2.page.html`, add the following:
-
-```html
-
-
-
-
-
-
-
-
-
-```
-
-Save the file and watch - a camera button appears! Tap on it and notice that it doesn’t do anything. Let’s fix that next.
-
-## Add the Camera Dependencies via the CLI
-
-In order to use the Camera, we need to bring in its JavaScript and native library dependencies. Back over in your Terminal window, run the following command, which adds the JavaScript library to the project, thus exposing the Camera API in TypeScript code:
-
-```shell
-npm install @awesome-cordova-plugins/camera
-```
-
-In `package.json`, you’ll notice a new JavaScript dependency has been added, with a version number similar to the following:
-
-`"@awesome-cordova-plugins/camera": "^5.4.0"`
-
-Next, run this command to add the native iOS and Android code, effectively allowing the Camera to work on a mobile device. For more info on how this works, read up on [Cordova](https://cordova.apache.org/docs/en/latest/guide/overview/) and [Ionic Native](https://ionicframework.com/docs/native).
-
-```shell
-ionic cordova plugin add cordova-plugin-camera
-```
-
-The `config.xml` file is now updated with an entry similar to the following for the native camera code:
-
-```xml
-
-```
-
-The next step is only required for iOS users. As of iOS 10, developers must provide a reason for why the app wishes to access the device camera. Add this inside the ios platform section () of `config.xml`:
-
-```xml
-
-
- Used to take pictures
-
-```
-
-## Add Camera plugin to Angular App Module
-
-There’s one more step we need to do since this is an Angular project: register the Camera in the App Module (`src/app/app.module.ts`). First, import the Camera module:
-
-```Javascript
-import { Camera } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Then, add it as a Provider:
-
-```Javascript
-providers: [
- StatusBar,
- SplashScreen,
- Camera,
- {provide: ErrorHandler, useClass: IonicErrorHandler}
- ],
-```
-
-It can now be used on any of our App pages.
-
-## Add the Camera to the Gallery page
-
-Our camera button doesn’t do anything yet. Over in `tab2.page.html`, add a click handler to the button:
-
-```html
-
-
-
-
-
-```
-
-Then, update the image placeholder. The following binds the “currentImage” variable (which we’ll work on next) to the image to display to the user.
-
-```html
-
-```
-
-Open `tab2.page.ts` next and import the Camera library:
-
-```Javascript
-import { Camera, CameraOptions } from '@awesome-cordova-plugins/camera/ngx';
-```
-
-Next, define the “currentImage” variable and inject the Camera into this class via the constructor:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-}
-```
-
-Finally, add the “takePicture” method in `tab2.page.ts`. It is already wired up to execute once the camera button has been tapped:
-
-```Javascript
-export class Tab2Page {
- currentImage: any;
-
- constructor(private camera: Camera) { }
-
- takePicture() {
- const options: CameraOptions = {
- quality: 100,
- destinationType: this.camera.DestinationType.DATA_URL,
- encodingType: this.camera.EncodingType.JPEG,
- mediaType: this.camera.MediaType.PICTURE
- };
-
- this.camera.getPicture(options).then((imageData) => {
- this.currentImage = 'data:image/jpeg;base64,' + imageData;
- }, (err) => {
- // Handle error
- console.log("Camera issue:" + err);
- });
- }
-}
-```
-
-Take notice: there’s no mention of iOS or Android! This is the awesome power of plugins: you use one API (`camera.getPicture()` in this case) and the plugin takes care of the platform differences for you. Write once, run everywhere. 😀
-
-Save this file then tap the Camera button in DevApp. Voila! The camera should open on your device. Once a photo has been taken, it displays on the Photo Gallery page.
-
-Next, we’ll cover how to transform the app into a photo gallery, as well as how to save the photos to your device!
diff --git a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/theming.mdx b/versioned_docs/version-v8/developer-resources/guides/first-app-v4/theming.mdx
deleted file mode 100644
index c55d591b308..00000000000
--- a/versioned_docs/version-v8/developer-resources/guides/first-app-v4/theming.mdx
+++ /dev/null
@@ -1,56 +0,0 @@
-# Make It Your Own! Ionic Theming
-
-Previously, we converted our single use Camera app into an epic photo gallery. Now, let’s explore how to make the photo gallery our own with Ionic theming. The visual design of the app is incredibly important - fortunately, Ionic provides a lot for us out-of-the-box.
-
-Ionic has nine default colors, defined as CSS variables, that can be used to change the color of its UI components:
-
-
-
-You can customize each color further by supplying a base, contrast, shade, and tint properties. These provide flexible control over your styles:
-
-
-
-You can find these colors defined in `src/theme/variables.scss`.
-
-By changing these variables here and there, you can easily update the entire theme of the application! Try changing a few of them and watch the app update in DevApp. For example, change the default blue color for Primary to purple:
-
-```css
-/** Ionic CSS Variables **/
-:root {
- /** primary **/
- --ion-color-primary: #b36bff;
- --ion-color-primary-rgb: 179, 107, 255;
- --ion-color-primary-contrast: #000000;
- --ion-color-primary-contrast-rgb: 0, 0, 0;
- --ion-color-primary-shade: #9e5ee0;
- --ion-color-primary-tint: #bb7aff;
-}
-```
-
-The easiest and most powerful way to create custom color palettes for your app’s UI is Ionic's [Color Generator tool](../../../theming/color-generator.mdx). As you change a color’s hex values, the embedded demo app automatically reflects the new colors. When you've finished making changes, simply copy and paste the generated code directly into your Ionic project.
-
-But wait, there’s more! Ionic automatically provides platform specific styles based on the device the application is running on, giving that native look and feel your users are used to:
-
-
-
-In our app, this is clearly visible in how the header and the icons are styled.
-
-If you want consistency, you can tell Ionic to use the same mode regardless of platform. For example, to apply Material Design (Android’s platform style), set it globally in the App Module class. Open `src/app/app.module.ts`, then set the `mode` property:
-
-```Javascript
-imports: [
- BrowserModule,
- IonicModule.forRoot({
- mode: "md"
- }),
- IonicStorageModule.forRoot()
- ],
-```
-
-Now, the iOS version of our app has a Material Design skin!
-
-
-
-Creating gorgeous-looking Ionic apps is easy with CSS variables and platform-specific styling. You now have everything you need to get started with Ionic.
-
-Go forth and build great apps!
diff --git a/versioned_docs/version-v8/developer-resources/posts.mdx b/versioned_docs/version-v8/developer-resources/posts.mdx
deleted file mode 100644
index a8c5b3f861c..00000000000
--- a/versioned_docs/version-v8/developer-resources/posts.mdx
+++ /dev/null
@@ -1,77 +0,0 @@
----
-sidebar_label: Posts
----
-
-# Community Posts
-
-### [What's new in Ionic 5 - Migration and Free Starter](https://ionicthemes.com/tutorials/about/ionic5-tutorial-migration-and-starter)
-
-Take advantage of the new benefits from Ionic 5. In this guide we describe the main changes and show you how to migrate your applications from Ionic 4 to Ionic 5. For this post we created an Ionic 5 CRUD Contacts app that you can download for free to learn how to start using Ionic 5.
-
-### [Ionic Navigation and Angular Routing](https://ionicthemes.com/tutorials/about/ionic-navigation-and-routing-ultimate-guide)
-
-Learn how to master Routing and Navigation in Ionic Angular Apps as well as some usability tricks you can add to your apps to improve the user experience!
-
-### [Firebase Authentication Tutorial For Ionic Apps](https://ionicthemes.com/tutorials/about/firebase-authentication-in-ionic-framework-apps)
-
-Learn how to add Firebase Authentication to your Ionic 5 App. This tutorial explains step by step how to configure both the Firebase and the Ionic Apps to enable authentication with social providers such as Google, Facebook and Twitter and also with Email and Password.
-
-### [Native Cross Platform Web Apps with Ionic Capacitor](https://ionicthemes.com/tutorials/about/native-cross-platform-web-apps-with-ionic-capacitor)
-
-Ionic Capacitor introduction guide for beginners: history, motivation, usage and how to migrate your existing Cordova apps to Capacitor.
-
-### [Ionic Skeleton Loading Screens](https://ionicthemes.com/tutorials/about/improved-ux-for-ionic-apps-with-skeleton-loading-screens)
-
-UI Skeletons, Ghost Elements, Shell Elements? They are all the same! Think of them as cool content placeholders that are shown where the content will eventually be once it becomes available. In this guide you will learn the importance of adopting the App Shell pattern in your ionic apps and discuss how to implement it using Ionic and Angular. Also, we explain some advanced CSS techniques to take the UX to the next level.
-
-### [The Complete Guide To Progressive Web Apps with Ionic](https://ionicthemes.com/tutorials/about/the-complete-guide-to-progressive-web-apps-with-ionic4)
-
-Learn what Progressive Web Apps are, why you should consider them for your next project, and how easy is to build a complete and production ready PWA with Ionic.
-
-### [Mastering Web Components in Ionic](https://ionicthemes.com/tutorials/about/ionic-4-tutorial-mastering-web-components-in-ionic-4)
-
-Understanding the new component architecture in Ionic, including web components, shadow DOM, CSS 4 variables and Stencil.
-
-### [Forms and Validations in Ionic 5](https://ionicthemes.com/tutorials/about/forms-and-validation-in-ionic)
-
-Learn everything about Ionic Forms and input validations in Ionic Angular apps.
-
-### [Building a Ionic Firebase App step by step](https://ionicthemes.com/tutorials/about/building-a-ionic-firebase-app-step-by-step)
-
-Learn how to make a CRUD application using Ionic Framework, Cloud Firestore for the database, and Cloud Storage for image storage.
-
-### [Ionic and WordPress Integration using the WordPress REST API](https://ionicthemes.com/tutorials/about/ionic-wordpress-integration)
-
-Learn how to connect your Ionic app with your WordPress site using the WordPress REST API.
-
-### [Understanding Ionic 2: Imports](http://mcgivery.com/understanding-ionic-2-imports/)
-
-ES6/TS introduce a new way to bring in external code. Learn about Imports.
-
-### [Ionic 2 / Angular 2 Concepts](https://www.joshmorony.com/ionic-2-first-look-series-new-angular-2-concepts-syntax/)
-
-Familiarize yourself with some of the new concepts in Ionic 2 and Angular 2.
-
-### [Ionic, PouchDB, & SQLite For Storage](http://gonehybrid.com/how-to-use-pouchdb-sqlite-for-local-storage-in-ionic-2/)
-
-Simplify storage using PouchDB and Sqlite.
-
-### [Advanced Google Maps](https://www.joshmorony.com/creating-an-advanced-google-maps-component-in-ionic-2/)
-
-Go beyond adding a simple map to handling offline conditions and complex maps.
-
-### [Background Geolocation](https://www.joshmorony.com/adding-background-geolocation-to-an-ionic-2-application/)
-
-Learn how to add geolocation that can run in the background of your app.
-
-### [Taking Advantage of Observables](https://blog.thoughtram.io/angular/2016/01/06/taking-advantage-of-observables-in-angular2.html)
-
-Learn how to use observables in your Ionic 2 app.
-
-### [Using the Angular Router in ionic/angular 4](https://www.joshmorony.com/using-angular-routing-with-ionic-4/)
-
-Learn how to use the Angular Router in your `@ionic/angular` 4 app.
-
-### [Ionic 4 examples using Angular, Vue and React](https://ionicworkshop.com/posts/introduction-to-ionic-framework-angular-vue-react/)
-
-Learn how to use Ionic 4 with Angular, React and Vue.
diff --git a/versioned_docs/version-v8/developer-resources/tools.mdx b/versioned_docs/version-v8/developer-resources/tools.mdx
deleted file mode 100644
index c38ba90eef8..00000000000
--- a/versioned_docs/version-v8/developer-resources/tools.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Tools
-
-### [Angular CLI](https://github.com/angular/angular-cli)
-
-Learn more about the power of the Angular CLI
-
-### [StackBlitz](https://stackblitz.com/)
-
-Quickly get started with a new Ionic app entirely in the browser!
-
-### [TypeScript](https://www.typescriptlang.org/)
-
-Check out the features that make working with TypeScript amazing.
-
-### [Glossary](../reference/glossary.mdx)
-
-A list of common terms you'll encounter while developing in Ionic.
-
-### [Starter Apps](https://ionicthemes.com)
-
-Ionic Starter Apps to speed up and improve your app development.
diff --git a/versioned_docs/version-v8/developer-resources/videos.mdx b/versioned_docs/version-v8/developer-resources/videos.mdx
deleted file mode 100644
index bdc0a784d25..00000000000
--- a/versioned_docs/version-v8/developer-resources/videos.mdx
+++ /dev/null
@@ -1,21 +0,0 @@
-# Videos
-
-### [Ionic 2 Crash Course](https://www.youtube.com/watch?v=O2WiI9QrS5s&feature=youtu.be)
-
-A quick introduction to Ionic 2 and how to build your first app.
-
-### [Ionic & Async](https://blog.ionicframework.com/screencast-ionic-async/)
-
-Learn how to coordinate multiple events in a timely manner.
-
-### [Building a TODO app in Ionic 2](http://www.joshmorony.com/build-a-todo-app-from-scratch-with-ionic-2-video-tutorial/)
-
-Learn how to build out an entire Ionic 2 app.
-
-### [Angular Connect: Ionic 2](https://www.youtube.com/watch?v=bAlydPwFONY)
-
-Dive into some of the ideas and goals behind Ionic 2.
-
-### [Ionic & Typings](https://blog.ionicframework.com/ionic-and-typings/)
-
-Learn how to add typings for libraries you are using in your Ionic 2 app.
diff --git a/versioned_docs/version-v8/intro/first-app.mdx b/versioned_docs/version-v8/intro/first-app.mdx
deleted file mode 100644
index 3fc9be2b1fd..00000000000
--- a/versioned_docs/version-v8/intro/first-app.mdx
+++ /dev/null
@@ -1,24 +0,0 @@
----
-hide_table_of_contents: true
----
-
-import DocsCard from '@components/global/DocsCard';
-import DocsCards from '@components/global/DocsCards';
-
-# Build Your First App Tutorial
-
-Pick the JavaScript framework you plan to use while building your Ionic app:
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Angular.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with React.
-
-
-
-
A complete guide to get you up to speed with the basics of building Ionic apps with Vue.
-
-
diff --git a/versioned_docs/version-v8/test/page1.mdx b/versioned_docs/version-v8/test/page1.mdx
deleted file mode 100644
index cd5b72410d0..00000000000
--- a/versioned_docs/version-v8/test/page1.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 1
-
-This is Testing page 1, Get to Testing Page 2 [here](page2.mdx).
diff --git a/versioned_docs/version-v8/test/page2.mdx b/versioned_docs/version-v8/test/page2.mdx
deleted file mode 100644
index 5ebdef8dca0..00000000000
--- a/versioned_docs/version-v8/test/page2.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 2
-
-This is Testing page 2, Get to Testing Page 1 [here](page1.mdx).
diff --git a/versioned_docs/version-v9/angular/add-to-existing.mdx b/versioned_docs/version-v9/angular/add-to-existing.mdx
index 4b958cf5c34..2ef3d723578 100644
--- a/versioned_docs/version-v9/angular/add-to-existing.mdx
+++ b/versioned_docs/version-v9/angular/add-to-existing.mdx
@@ -22,7 +22,7 @@ This guide uses `.css` file extensions for stylesheets. If you created your Angu
:::
-## Setup
+## Setup {/* #setup */}
:::info
@@ -32,7 +32,7 @@ This guide follows the structure of an Angular app created with the Angular CLI.
You can add Ionic Angular to your existing Angular project using the Angular CLI's `ng add` feature or by installing it manually.
-### Using ng add
+### Using ng add {/* #using-ng-add */}
The easiest way to add Ionic Angular is to use the Angular CLI's `ng add` feature:
@@ -42,17 +42,17 @@ ng add @ionic/angular
This will install the `@ionic/angular` package and automatically configure the necessary imports and styles.
-### Manual Installation
+### Manual Installation {/* #manual-installation */}
If you prefer to install Ionic Angular manually, you can follow these steps:
-#### 1. Install the Package
+#### 1. Install the Package {/* #1-install-the-package */}
```bash
npm install @ionic/angular
```
-#### 2. Add Ionic Framework Stylesheets
+#### 2. Add Ionic Framework Stylesheets {/* #2-add-ionic-framework-stylesheets */}
Replace the existing `styles` array in `angular.json` with the following:
@@ -80,7 +80,7 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography.
:::
-#### 3. Configure Ionic Angular
+#### 3. Configure Ionic Angular {/* #3-configure-ionic-angular */}
Update `src/app/app.config.ts` to include `provideIonicAngular`:
@@ -98,7 +98,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.
-## Using Individual Components
+## Using Individual Components {/* #using-individual-components */}
After completing the setup above, you can start using Ionic components in your existing Angular app. Here's an example of how to use them:
@@ -125,11 +125,11 @@ export class App {}
Visit the [components](/components.mdx) page for all of the available Ionic components.
-## Using Ionic Pages
+## Using Ionic Pages {/* #using-ionic-pages */}
If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
-#### 1. Add Additional Ionic Framework Stylesheets
+#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
Replace the existing `styles` array in `angular.json` with the following:
@@ -174,7 +174,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).
-#### 2. Set up Theming
+#### 2. Set up Theming {/* #2-set-up-theming */}
Create a `src/theme/variables.css` file with the following content:
@@ -193,7 +193,7 @@ Create a `src/theme/variables.css` file with the following content:
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 {/* #3-update-the-app-component */}
Update `src/app/app.html` to the following:
@@ -218,7 +218,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/angular';
export class App {}
```
-#### 4. Create a Home Page
+#### 4. Create a Home Page {/* #4-create-a-home-page */}
Start by adding a template at `src/app/home/home.html`:
@@ -293,7 +293,7 @@ Finally, add a `src/app/home/home.css` file:
}
```
-#### 5. Set up Routing
+#### 5. Set up Routing {/* #5-set-up-routing */}
Update `src/app/app.routes.ts` to add a `home` route:
@@ -316,7 +316,7 @@ export const routes: Routes = [
You're all set! Your Ionic Angular app is now configured with full Ionic page support. Run `ng serve` to start your development server and view your app.
-## Next Steps
+## Next Steps {/* #next-steps */}
Now that you have Ionic Angular integrated into your project, check out:
diff --git a/versioned_docs/version-v9/angular/build-options.mdx b/versioned_docs/version-v9/angular/build-options.mdx
index f852e122236..f9dc9e3323a 100644
--- a/versioned_docs/version-v9/angular/build-options.mdx
+++ b/versioned_docs/version-v9/angular/build-options.mdx
@@ -7,7 +7,7 @@ Developers have two options for using Ionic components: Standalone or Modules. T
The Standalone approach uses modern Angular APIs and is the recommended way to build Ionic applications. The Modules approach, including `IonicModule`, is **deprecated** and will be removed in a future major release. New projects should use the Standalone approach. Existing apps will continue to work but should plan to migrate. Refer to [Migrating from Modules to Standalone](#migrating-from-modules-to-standalone) for migration guidance.
-## Standalone
+## Standalone {/* #standalone */}
:::info
@@ -15,7 +15,7 @@ Ionic UI components as Angular standalone components is supported starting in Io
:::
-### Overview
+### Overview {/* #overview */}
Developers can use Ionic components as standalone components to take advantage of treeshaking and newer Angular features. This option involves importing specific Ionic components in the Angular components you want to use them in. Developers can use Ionic standalone components even if their Angular application is NgModule-based.
@@ -37,7 +37,7 @@ Ionic ships standalone components from a single entry point (`@ionic/angular`).
:::
-### Usage with Standalone-based Applications
+### Usage with Standalone-based Applications {/* #usage-with-standalone-based-applications */}
:::warning
@@ -206,7 +206,7 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us
-### Usage with NgModule-based Applications
+### Usage with NgModule-based Applications {/* #usage-with-ngmodule-based-applications */}
:::warning
@@ -371,7 +371,7 @@ Ionic Angular's standalone components use ES Modules. As a result, developers us
-## Modules
+## Modules {/* #modules */}
:::warning[Deprecation Notice]
@@ -379,7 +379,7 @@ The Modules approach, including `IonicModule`, is **deprecated** and will be rem
:::
-### Overview
+### Overview {/* #overview-1 */}
Developers can also use the Modules approach by importing `IonicModule` and calling `IonicModule.forRoot()` in the `imports` array in `app.module.ts`. This registers a version of Ionic where Ionic components will be lazily loaded at runtime.
@@ -392,7 +392,7 @@ Developers can also use the Modules approach by importing `IonicModule` and call
1. Lazily loading Ionic components means that the compiler does not know which components are needed at build time. This means your final application bundle may be much larger than it needs to be.
2. Developers are unable to use newer Angular features such as [ESBuild](https://angular.io/guide/esbuild).
-### Usage
+### Usage {/* #usage */}
In the example below, we are using `IonicModule` to create a lazily loaded version of Ionic. We can then reference any Ionic component without needing to explicitly import it.
@@ -412,7 +412,7 @@ import { AppComponent } from './app.component';
export class AppModule {}
```
-## Migrating from Modules to Standalone
+## Migrating from Modules to Standalone {/* #migrating-from-modules-to-standalone */}
:::tip
@@ -428,7 +428,7 @@ Migrating to Ionic standalone components must be done all at the same time and c
Developers are encouraged to try the [automated migration utility](https://github.com/ionic-team/ionic-angular-standalone-codemods), though they can also follow the steps below if they would like to manually migrate their applications.
-### Standalone-based Applications
+### Standalone-based Applications {/* #standalone-based-applications */}
Follow these steps if your Angular application is already using the standalone architecture, and you want to use Ionic UI components as standalone components too.
@@ -551,7 +551,7 @@ export class TestComponent {}
}
```
-### NgModule-based Applications
+### NgModule-based Applications {/* #ngmodule-based-applications */}
Follow these steps if your Angular application is still using the NgModule architecture, but you want to adopt Ionic UI components as standalone components now.
diff --git a/versioned_docs/version-v9/angular/injection-tokens.mdx b/versioned_docs/version-v9/angular/injection-tokens.mdx
index 2367036ab74..653f5bcadf7 100644
--- a/versioned_docs/version-v9/angular/injection-tokens.mdx
+++ b/versioned_docs/version-v9/angular/injection-tokens.mdx
@@ -13,7 +13,7 @@ sidebar_label: Injection Tokens
Ionic provides Angular injection tokens that allow you to access Ionic elements through Angular's dependency injection system. This provides a more Angular-idiomatic way to interact with Ionic components programmatically.
-## Benefits
+## Benefits {/* #benefits */}
Using injection tokens provides several advantages:
@@ -22,13 +22,13 @@ Using injection tokens provides several advantages:
- **Simplified Code**: Eliminates the need for `ViewChild` queries or manual element references
- **Better Testing**: Easier to mock and test components that use injection tokens
-## IonModalToken
+## IonModalToken {/* #ionmodaltoken */}
The `IonModalToken` injection token allows you to inject a reference to the current modal element directly into your Angular components. This is particularly useful when you need to programmatically control modal behavior, listen to modal events, or access modal properties.
Starting in `@ionic/angular` v8.7.0, you can use this injection token to streamline modal interactions in your Angular applications.
-### Basic Usage
+### Basic Usage {/* #basic-usage */}
To use the `IonModalToken`, inject it into your component's constructor:
@@ -60,7 +60,7 @@ export class ModalComponent {
}
```
-### Listening to Modal Events
+### Listening to Modal Events {/* #listening-to-modal-events */}
You can use the injected modal reference to listen to modal lifecycle events:
@@ -102,7 +102,7 @@ export class ModalComponent implements OnInit {
}
```
-### Accessing Modal Properties
+### Accessing Modal Properties {/* #accessing-modal-properties */}
The injected modal reference provides access to all modal properties and methods:
@@ -143,7 +143,7 @@ export class ModalComponent implements OnInit {
}
```
-### Opening a Modal with Injection Token Content
+### Opening a Modal with Injection Token Content {/* #opening-a-modal-with-injection-token-content */}
When opening a modal that uses the injection token, you can pass the component directly to the modal controller:
diff --git a/versioned_docs/version-v9/angular/lifecycle.mdx b/versioned_docs/version-v9/angular/lifecycle.mdx
index c6a7a79aab4..4032209defe 100644
--- a/versioned_docs/version-v9/angular/lifecycle.mdx
+++ b/versioned_docs/version-v9/angular/lifecycle.mdx
@@ -15,7 +15,7 @@ This guide covers how the page life cycle works in an app built with Ionic and A

-## Angular Life Cycle Events
+## Angular Life Cycle Events {/* #angular-life-cycle-events */}
Ionic embraces the life cycle events provided by Angular. The two Angular events you will find using the most are:
@@ -36,7 +36,7 @@ On **Angular 18 through 21** this only affects you if you set `OnPush` on those
:::
-## Ionic Page Events
+## Ionic Page Events {/* #ionic-page-events */}
In addition to the Angular life cycle events, Ionic Angular provides a few additional events that you can use:
@@ -55,7 +55,7 @@ For `ionViewWillLeave` and `ionViewDidLeave`, `ionViewWillLeave` gets called dir

-## How Ionic Handles the Life of a Page
+## How Ionic Handles the Life of a Page {/* #how-ionic-handles-the-life-of-a-page */}
Ionic has its router outlet, called ``. This outlet extends Angular's `` with some additional functionality to enable better experiences for mobile devices.
@@ -70,7 +70,7 @@ Because of this special handling, the `ngOnInit` and `ngOnDestroy` methods might
`ngOnInit` will only fire each time the page is freshly created, but not when navigated back to the page. For instance, navigating between each page in a tabs interface will only call each page's `ngOnInit` method once, but not on subsequent visits. `ngOnDestroy` will only fire when a page "popped".
-## Route Guards
+## Route Guards {/* #route-guards */}
In Ionic 3, there were a couple of additional life cycle methods that were useful to control when a page could be entered (`ionViewCanEnter`) and left (`ionViewCanLeave`). These could be used to protect pages from unauthorized users and to keep a user on a page when you don't want them to leave (like during a form fill).
@@ -97,7 +97,7 @@ To use this guard, add it to the appropriate param in the route definition:
For more info on how to use route guards, go to Angular's [router documentation](https://angular.io/guide/router).
-## Guidance for Each Life Cycle Method
+## Guidance for Each Life Cycle Method {/* #guidance-for-each-life-cycle-method */}
Below are some tips on use cases for each of the life cycle events.
diff --git a/versioned_docs/version-v9/angular/navigation.mdx b/versioned_docs/version-v9/angular/navigation.mdx
index 06d08641a9f..f1440eac70a 100644
--- a/versioned_docs/version-v9/angular/navigation.mdx
+++ b/versioned_docs/version-v9/angular/navigation.mdx
@@ -17,7 +17,7 @@ This guide covers how routing works in an app built with Ionic and Angular.
The Angular Router is one of the most important libraries in an Angular application. Without it, apps would be single view/single context apps or would not be able to maintain their navigation state on browser reloads. With Angular Router, we can create rich apps that are linkable and have rich animations (when paired with Ionic of course). Let's walk through the basics of the Angular Router and how we can configure it for Ionic apps.
-## A simple Route
+## A simple Route {/* #a-simple-route */}
For most apps, having some sort of route is often required. The most basic configuration looks a bit like this:
@@ -38,7 +38,7 @@ import { RouterModule } from '@angular/router';
The simplest breakdown for what we have here is a path/component lookup. When our app loads, the router kicks things off by reading the URL the user is trying to load. In our sample, our route looks for `''`, which is essentially our index route. So for this, we load the `LoginComponent`. Fairly straight forward. This pattern of matching paths with a component continues for every entry we have in the router config. But what if we wanted to load a different path on our initial load?
-## Handling Redirects
+## Handling Redirects {/* #handling-redirects */}
For this we can use router redirects. Redirects work the same way that a typical route object does, but just includes a few different keys.
@@ -70,7 +70,7 @@ Alternatively, if we used:
Then load both `/route1/route2/route3` and `/route1/route2/route4`, we'll be redirected for both routes. This is because `pathMatch: 'prefix'` will match only part of the path.
-## Navigating to different routes
+## Navigating to different routes {/* #navigating-to-different-routes */}
Talking about routes is good and all, but how does one actually navigate to said routes? For this, we can use the `routerLink` directive. Let's go back and take our simple router setup from earlier:
@@ -118,7 +118,7 @@ export class LoginComponent {
Both options provide the same navigation mechanism, just fitting different use cases.
-### Navigating using LocationStrategy.historyGo
+### Navigating using LocationStrategy.historyGo {/* #navigating-using-locationstrategyhistorygo */}
Angular Router has a [LocationStrategy.historyGo](https://angular.io/api/common/LocationStrategy#historyGo) method that allows developers to move forward or backward through the application history. Let's walk through an example.
@@ -130,7 +130,7 @@ If you were to call `LocationStrategy.historyGo(-2)` on `/pageC`, you would be b
An key characteristic of `LocationStrategy.historyGo()` is that it expects your application history to be linear. This means that `LocationStrategy.historyGo()` should not be used in applications that make use of non-linear routing. Refer to [Linear Routing versus Non-Linear Routing](#linear-routing-versus-non-linear-routing) for more information.
-## Lazy loading routes
+## Lazy loading routes {/* #lazy-loading-routes */}
Now the current way our routes are setup makes it so they are included in the same chunk as the root app.module, which is not ideal. Instead, the router has a setup that allows the components to be isolated to their own chunks.
@@ -175,7 +175,7 @@ We're excluding some additional content and only including the necessary parts.
Here, we have a typical Angular Module setup, along with a RouterModule import, but we're now using `forChild` and declaring the component in that setup. With this setup, when we run our build, we will produce separate chunks for both the app component, the login component, and the detail component.
-## Standalone Components
+## Standalone Components {/* #standalone-components */}
Standalone components allow developers to lazy load a component on a route without having to declare the component to an Angular module.
@@ -203,15 +203,15 @@ If you are using `routerLink`, `routerDirection`, or `routerAction` be sure to a
To get started with standalone components [visit Angular's official docs](https://angular.io/guide/standalone-components).
-## Live Example
+## Live Example {/* #live-example */}
import NavigationPlayground from '@site/static/usage/v9/navigation/index.mdx';
-## Linear Routing versus Non-Linear Routing
+## Linear Routing versus Non-Linear Routing {/* #linear-routing-versus-non-linear-routing */}
-### Linear Routing
+### Linear Routing {/* #linear-routing */}
If you have built a web app that uses routing, you likely have used linear routing before. Linear routing means that you can move forward or backward through the application history by pushing and popping pages.
@@ -235,7 +235,7 @@ When we press the back button, we follow that same routing path except in revers
The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.
-### Non-Linear Routing
+### Non-Linear Routing {/* #non-linear-routing */}
Non-linear routing is a concept that may be new to many web developers learning to build mobile apps with Ionic.
@@ -263,7 +263,7 @@ If tapping the back button simply called `LocationStrategy.historyGo(-1)` from t
Non-linear routing allows for sophisticated user flows that linear routing cannot handle. However, certain linear routing APIs such as `LocationStrategy.historyGo()` cannot be used in this non-linear environment. This means that `LocationStrategy.historyGo()` should not be used when using tabs or nested outlets.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose */}
We recommend keeping your application as simple as possible until you need to add non-linear routing. Non-linear routing is very powerful, but it also adds a considerable amount of complexity to mobile applications.
@@ -273,11 +273,11 @@ For more on tabs, please refer to [Working with Tabs](#working-with-tabs).
For more on nested router outlets, please refer to [Nested Routes](#nested-routes).
-## Shared URLs versus Nested Routes
+## Shared URLs versus Nested Routes {/* #shared-urls-versus-nested-routes */}
A common point of confusion when setting up routing is deciding between shared URLs or nested routes. This part of the guide will explain both and help you decide which one to use.
-### Shared URLs
+### Shared URLs {/* #shared-urls */}
Shared URLs is a route configuration where routes have pieces of the URL in common. The following is an example of a shared URL configuration:
@@ -296,7 +296,7 @@ const routes: Routes = [
The above routes are considered "shared" because they reuse the `dashboard` piece of the URL.
-### Nested Routes
+### Nested Routes {/* #nested-routes */}
Nested Routes is a route configuration where routes are listed as children of other routes. The following is an example of a nested route configuration:
@@ -321,7 +321,7 @@ const routes: Routes = [
The above routes are nested because they are in the `children` array of the parent route. Notice that the parent route renders the `DashboardRouterOutlet` component. When you nest routes, you need to render another instance of `ion-router-outlet`.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose-1 */}
Shared URLs are great when you want to transition from page A to page B while preserving the relationship between the two pages in the URL. In our previous example, a button on the `/dashboard` page could transition to the `/dashboard/stats` page. The relationship between the two pages is preserved because of a) the page transition and b) the url.
@@ -329,7 +329,7 @@ Nested routes should be used when you want to render content in outlet A while a
There are very few use cases in which nested routes make sense in mobile applications. When in doubt, use the shared URL route configuration. We strongly caution against using nested routing in contexts other than tabs as it can quickly make navigating your app confusing.
-## Working with Tabs
+## Working with Tabs {/* #working-with-tabs */}
With Tabs, the Angular Router provides Ionic the mechanism to know what components should be loaded, but the heavy lifting is actually done by the tabs component. Let's walk through a simple example.
@@ -378,7 +378,7 @@ Here we have a "tabs" path that we load. In this example we call the path "tabs"
If you've built apps with Ionic before, this should feel familiar. We create a `ion-tabs` component, and provide a `ion-tab-bar`. The `ion-tab-bar` provides a `ion-tab-button` with a `tab` property that is associated with the tab "outlet" in the router config. Note that the latest version of `@ionic/angular` no longer requires ``, but instead allows developers to fully customize the tab bar, and the single source of truth lives within the router configuration.
-### How Tabs in Ionic Work
+### How Tabs in Ionic Work {/* #how-tabs-in-ionic-work */}
Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
@@ -386,7 +386,7 @@ This behavior is important to note as it is different than most tab implementati
Since Ionic is focused on helping developers build mobile apps, the tabs in Ionic are designed to match native mobile tabs as closely as possible. As a result, there may be certain behaviors in Ionic's tabs that differ from tabs implementations in other UI libraries. Read on to learn more about some of these differences.
-### Child Routes within Tabs
+### Child Routes within Tabs {/* #child-routes-within-tabs */}
When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `/tabs/tab1/view` route as a sibling of the `/tabs/tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `ion-tab-bar`.
@@ -442,7 +442,7 @@ const routes: Routes = [
];
```
-### Switching Between Tabs
+### Switching Between Tabs {/* #switching-between-tabs */}
Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
diff --git a/versioned_docs/version-v9/angular/overlays.mdx b/versioned_docs/version-v9/angular/overlays.mdx
index 423a91e02ac..cbe6a85dbbc 100644
--- a/versioned_docs/version-v9/angular/overlays.mdx
+++ b/versioned_docs/version-v9/angular/overlays.mdx
@@ -13,7 +13,7 @@ sidebar_label: Overlays
Ionic provides overlay components such as modals and popovers that display content on top of your application. In Angular, these overlays can be created using controllers like `ModalController` and `PopoverController`.
-## Creating Overlays
+## Creating Overlays {/* #creating-overlays */}
Overlays can be created programmatically using their respective controllers:
@@ -41,13 +41,13 @@ export class HomeComponent {
}
```
-## Custom Injectors
+## Custom Injectors {/* #custom-injectors */}
By default, overlay components use the root injector for dependency injection. This means that services or tokens provided at the route level or within a specific component tree are not accessible inside the overlay.
The `injector` option allows you to pass a custom Angular `Injector` when creating a modal or popover. This enables overlay components to access services and tokens that are not available in the root injector.
-### Use Cases
+### Use Cases {/* #use-cases */}
Custom injectors are useful when you need to:
@@ -55,7 +55,7 @@ Custom injectors are useful when you need to:
- Use Angular CDK's `Dir` directive for bidirectional text support
- Access any providers that are not registered at the root level
-### Usage
+### Usage {/* #usage */}
To use a custom injector, pass it to the `create()` method:
@@ -101,7 +101,7 @@ export class MyModalComponent {
}
```
-### Creating a Custom Injector
+### Creating a Custom Injector {/* #creating-a-custom-injector */}
You can also create a custom injector with specific providers:
@@ -139,7 +139,7 @@ export class FeatureComponent {
}
```
-### Using with Angular CDK Directionality
+### Using with Angular CDK Directionality {/* #using-with-angular-cdk-directionality */}
A common use case is providing the Angular CDK `Dir` directive to overlays for bidirectional text support:
@@ -169,7 +169,7 @@ export class FeatureComponent {
}
```
-### Popover Controller
+### Popover Controller {/* #popover-controller */}
The `PopoverController` supports the same `injector` option:
@@ -199,7 +199,7 @@ export class FeatureComponent {
}
```
-## Angular Options Types
+## Angular Options Types {/* #angular-options-types */}
Ionic Angular exports its own `ModalOptions` and `PopoverOptions` types that extend the core options with Angular-specific properties like `injector`:
@@ -212,7 +212,7 @@ These types are exported from `@ionic/angular` and `@ionic/angular/lazy`:
import type { ModalOptions, PopoverOptions } from '@ionic/angular';
```
-## Docs for Overlays in Ionic
+## Docs for Overlays in Ionic {/* #docs-for-overlays-in-ionic */}
For full docs and usage examples, visit the docs page for each of the overlays in Ionic:
diff --git a/versioned_docs/version-v9/angular/overview.mdx b/versioned_docs/version-v9/angular/overview.mdx
index 923c4b5410e..1fb4aa3982c 100644
--- a/versioned_docs/version-v9/angular/overview.mdx
+++ b/versioned_docs/version-v9/angular/overview.mdx
@@ -16,19 +16,19 @@ import DocsCards from '@components/global/DocsCards';
`@ionic/angular` brings the full power of the Ionic Framework to Angular developers. It offers seamless integration with the Angular ecosystem, so you can build high-quality cross-platform apps using familiar Angular tools, components, and best practices. You also get access to Ionic's extensive UI library and native capabilities.
-## Angular Version Support
+## 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).
-## Angular Tooling
+## Angular Tooling {/* #angular-tooling */}
Ionic uses the official Angular stack for building apps and routing, so your app can fall in line with the rest of the Angular ecosystem. In cases where more opinionated features are needed, Ionic provides `@ionic/angular-toolkit`, which builds and integrates with the [official Angular CLI](https://angular.io/cli) and provides features that are specific to `@ionic/angular` apps.
-## Native Tooling
+## Native Tooling {/* #native-tooling */}
[Capacitor](https://capacitorjs.com) is the official cross-platform runtime for Ionic Angular, enabling your apps to run natively on iOS, Android, and the web with a single codebase.
-## Installation
+## Installation {/* #installation */}
Before you begin, make sure you have [Node.js](https://nodejs.org/) (which includes npm) installed on your machine.
@@ -40,7 +40,7 @@ $ cd myApp
$ ionic serve █
```
-## Resources
+## Resources {/* #resources */}
diff --git a/versioned_docs/version-v9/angular/performance.mdx b/versioned_docs/version-v9/angular/performance.mdx
index 14ac3db954e..0faa660c24d 100644
--- a/versioned_docs/version-v9/angular/performance.mdx
+++ b/versioned_docs/version-v9/angular/performance.mdx
@@ -11,7 +11,7 @@ sidebar_label: Performance
/>
-## \*ngFor with Ionic Components
+## \*ngFor with Ionic Components {/* #ngfor-with-ionic-components */}
When using `*ngFor` with Ionic components, we recommend using Angular's `trackBy` option. This allows Angular to manage change propagation in a much more efficient way and only update the content inside of the component rather than re-create the component altogether.
@@ -44,17 +44,17 @@ In this example, we have an array of objects called `items`. Each object contain
For more information, refer to the [Angular NgForOf change propagation documentation](https://angular.io/api/common/NgForOf#change-propagation).
-## From the Ionic Team
+## From the Ionic Team {/* #from-the-ionic-team */}
[How to Lazy Load in Ionic Angular](https://ionicframework.com/blog/how-to-lazy-load-in-ionic-angular/)
[Improved Perceived Performance with Skeleton Screens](https://ionicframework.com/blog/improved-perceived-performance-with-skeleton-screens/)
-## From the Angular Team
+## From the Angular Team {/* #from-the-angular-team */}
[Build performant and progressive Angular apps](https://web.dev/angular) - web.dev
-## From the Community
+## From the Community {/* #from-the-community */}
{/* cspell:disable */}
diff --git a/versioned_docs/version-v9/angular/platform.mdx b/versioned_docs/version-v9/angular/platform.mdx
index 7aa72bba712..ad013cff64e 100644
--- a/versioned_docs/version-v9/angular/platform.mdx
+++ b/versioned_docs/version-v9/angular/platform.mdx
@@ -15,7 +15,7 @@ import TabItem from '@theme/TabItem';
The Platform service can be used to get information about your current device. You can get all of the platforms associated with the device using the `platforms` method, including whether the app is being viewed from a tablet, if it's on a mobile device or browser, and the exact platform (iOS, Android, etc). You can also get the orientation of the device, if it uses right-to-left language direction, and much much more. With this information you can completely customize your app to fit any device.
-## Usage
+## Usage {/* #usage */}
-## Methods
+## Methods {/* #methods */}
-### `is`
+### `is` {/* #is */}
| | |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Depending on the platform the user is on, `is(platformName)` will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: `mobile`, `ios`, `ipad`, and `tablet`. Additionally, if the app was running from Cordova then `cordova` would be true. |
| **Signature** | `is(platformName: Platforms) => boolean` |
-#### Parameters
+#### Parameters {/* #parameters */}
| Name | Type | Description |
| -------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `platformName` | `Platforms` | Name of the platform. Available options are android, capacitor, cordova, desktop, electron, hybrid, ios, ipad, iphone, mobile, phablet, pwa, tablet |
-#### Platforms
+#### Platforms {/* #platforms */}
Below is a table listing all the possible platform values along with corresponding descriptions.
@@ -91,7 +91,7 @@ Below is a table listing all the possible platform values along with correspondi
| pwa | a PWA app |
| tablet | a tablet device |
-#### Customizing Platform Detection Functions
+#### 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.
@@ -179,82 +179,82 @@ type PlatformConfig = {
};
```
-### `platforms`
+### `platforms` {/* #platforms-1 */}
| | |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Depending on what device you are on, `platforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return `mobile`, `ios`, and `iphone`. |
| **Signature** | `platforms() => string[]` |
-### `ready`
+### `ready` {/* #ready */}
| | |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Description** | Returns a promise when the platform is ready and native functionality can be called. If the app is running from within a web browser, then the promise will resolve when the DOM is ready. When the app is running from an application engine such as Cordova, then the promise will resolve when Cordova triggers the `deviceready` event. The resolved value is the `readySource`, which states the platform that was used.
` element. |
| `.ion-display-table-row` | `display: table-row` | The element behaves like an HTML `
` element. |
-### Responsive Display Classes
+### Responsive Display Classes {/* #responsive-display-classes */}
All of the display classes listed above have additional classes to modify the display based on the screen size. Instead of `display-` in each class, use `display-{breakpoint}-` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -224,7 +224,7 @@ The table below shows the default behavior, where `{modifier}` is any of the fol
| `.ion-display-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-display-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-### Deprecated Classes
+### Deprecated Classes {/* #deprecated-classes */}
:::warning[Deprecation Notice]
@@ -240,9 +240,9 @@ The following classes are deprecated and will be removed in the next major relea
| `.ion-hide-lg-{dir}` | Applies the modifier to the element when `min-width: 992px` (`up`) or `max-width: 992px` (`down`). **Deprecated** — Use the `ion-display-lg-{modifier}` classes instead. |
| `.ion-hide-xl-{dir}` | Applies the modifier to the element when `min-width: 1200px` (`up`) or `max-width: 1200px` (`down`). **Deprecated** — Use the `ion-display-xl-{modifier}` classes instead. |
-## Content Space
+## Content Space {/* #content-space */}
-### Padding
+### Padding {/* #padding */}
The padding class sets the padding area of an element. The padding area is the space between the content of the element and its border.
@@ -292,7 +292,7 @@ The default amount of `padding` to be applied is `16px` and is set by the `--ion
| `.ion-padding-horizontal` | `padding: 0 16px` | Applies padding to the left and right. |
| `.ion-no-padding` | `padding: 0` | Applies no padding to all sides. |
-### Margin
+### Margin {/* #margin */}
The margin area extends the border area with an empty area used to separate the element from its neighbors.
@@ -342,13 +342,13 @@ The default amount of `margin` to be applied is `16px` and is set by the `--ion-
| `.ion-margin-horizontal` | `margin: 0 16px` | Applies margin to the left and right. |
| `.ion-no-margin` | `margin: 0` | Applies no margin to all sides. |
-## Flex Container Properties
+## Flex Container Properties {/* #flex-container-properties */}
Flexbox properties are divided into two categories: **container properties** that control the layout of all flex items, and **item properties** that control individual flex items. Refer to [Flex Item Properties](#flex-item-properties) for item-level alignment.
-### Align Items
+### Align Items {/* #align-items */}
The [align-items](https://developer.mozilla.org/en-US/docs/Web/CSS/align-items) CSS property sets the [align-self](#align-self) value on all direct children as a group. In flexbox, it controls the alignment of items on the cross axis. In grid layout, it controls the alignment of items on the block axis within their grid areas.
@@ -364,7 +364,7 @@ Ionic provides the following utility classes for `align-items`:
| `.ion-align-items-baseline` | `align-items: baseline` | Items are aligned so that their baselines align. |
| `.ion-align-items-stretch` | `align-items: stretch` | Items are stretched to fill the container. |
-### Align Content
+### Align Content {/* #align-content */}
The [align-content](https://developer.mozilla.org/en-US/docs/Web/CSS/align-content) CSS property sets the distribution of space between and around content items along a flexbox's cross axis, or a grid or block-level element's block axis.
@@ -383,7 +383,7 @@ Ionic provides the following utility classes for `align-content`:
| `.ion-align-content-between` | `align-content: space-between` | Lines are evenly distributed on the cross axis. |
| `.ion-align-content-around` | `align-content: space-around` | Lines are evenly distributed with equal space around them. |
-### Justify Content
+### Justify Content {/* #justify-content */}
The [justify-content](https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content) CSS property defines how the browser distributes space between and around content items along the main axis of a flex container and the inline axis of grid and multi-column containers.
@@ -400,7 +400,7 @@ Ionic provides the following utility classes for `justify-content`:
| `.ion-justify-content-between` | `justify-content: space-between` | Items are evenly distributed on the main axis. |
| `.ion-justify-content-evenly` | `justify-content: space-evenly` | Items are distributed so that the spacing between any two items is equal. |
-### Flex Direction
+### Flex Direction {/* #flex-direction */}
The [flex-direction](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction) CSS property sets how flex items are placed in the flex container defining the main axis and the direction (normal or reversed).
@@ -415,7 +415,7 @@ Ionic provides the following utility classes for `flex-direction`:
| `.ion-flex-column` | `flex-direction: column` | Items are placed vertically. |
| `.ion-flex-column-reverse` | `flex-direction: column-reverse` | Items are placed vertically in reverse order. |
-### Flex Wrap
+### Flex Wrap {/* #flex-wrap */}
The [flex-wrap](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap) CSS property sets whether flex items are forced onto one line or can wrap onto multiple lines. If wrapping is allowed, it sets the direction that lines are stacked.
@@ -429,7 +429,7 @@ Ionic provides the following utility classes for `flex-wrap`:
| `.ion-flex-wrap` | `flex-wrap: wrap` | Items will wrap onto multiple lines, from top to bottom. |
| `.ion-flex-wrap-reverse` | `flex-wrap: wrap-reverse` | Items will wrap onto multiple lines, from bottom to top. |
-### Responsive Flex Container Classes
+### Responsive Flex Container Classes {/* #responsive-flex-container-classes */}
All of the flex container classes listed above have additional classes to modify the properties based on the screen size. Instead of the base class name, use `{property}-{breakpoint}-{modifier}` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -443,7 +443,7 @@ The table below shows the default behavior, where `{property}` is one of the fol
| `.ion-{property}-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-{property}-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-### Deprecated Classes
+### Deprecated Classes {/* #deprecated-classes-1 */}
:::warning[Deprecation Notice]
@@ -457,11 +457,11 @@ The following classes are deprecated and will be removed in the next major relea
| `.ion-wrap` | Items will wrap onto multiple lines, from top to bottom. **Deprecated** — Use `.ion-flex-wrap` instead. |
| `.ion-wrap-reverse` | Items will wrap onto multiple lines, from bottom to top. **Deprecated** — Use `.ion-flex-wrap-reverse` instead. |
-## Flex Item Properties
+## Flex Item Properties {/* #flex-item-properties */}
Flex item properties control how individual flex items behave within their flex container. See also: [Flex Container Properties](#flex-container-properties) for container-level alignment.
-### Align Self
+### Align Self {/* #align-self */}
The [align-self](https://developer.mozilla.org/en-US/docs/Web/CSS/align-self) CSS property overrides a grid or flex item's align-items value. In grid, it aligns the item inside the grid area. In flexbox, it aligns the item on the cross axis.
@@ -480,7 +480,7 @@ Ionic provides the following utility classes for `align-self`:
| `.ion-align-self-stretch` | `align-self: stretch` | Item is stretched to fill the container. |
| `.ion-align-self-auto` | `align-self: auto` | Item is positioned according to the parent's `align-items` value. |
-### Flex
+### Flex {/* #flex */}
The [flex](https://developer.mozilla.org/en-US/docs/Web/CSS/flex) CSS property is a shorthand property for `flex-grow`, `flex-shrink` and `flex-basis`. It sets how a flex item will grow or shrink to fit the space available in its flex container.
@@ -495,7 +495,7 @@ Ionic provides the following utility classes for `flex`:
| `.ion-flex-initial` | `flex: initial` | Item shrinks to its minimum content size but does not grow. |
| `.ion-flex-none` | `flex: none` | Item does not grow or shrink. |
-### Flex Grow
+### Flex Grow {/* #flex-grow */}
The [flex-grow](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow) CSS property sets the flex grow factor, which specifies how much of the flex container's positive free space, if any, should be assigned to the flex item's main size.
@@ -508,7 +508,7 @@ Ionic provides the following utility classes for `flex-grow`:
| `.ion-flex-grow-0` | `flex-grow: 0` | Item does not grow beyond its content size. |
| `.ion-flex-grow-1` | `flex-grow: 1` | Item grows to fill available space proportionally. |
-### Flex Shrink
+### Flex Shrink {/* #flex-shrink */}
The [flex-shrink](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink) CSS property sets the flex shrink factor of a flex item. If the size of all flex items is larger than the flex container, the flex items can shrink to fit according to their `flex-shrink` value. Each flex line's negative free space is distributed between the line's flex items that have a `flex-shrink` value greater than `0`.
@@ -521,7 +521,7 @@ Ionic provides the following utility classes for `flex-shrink`:
| `.ion-flex-shrink-0` | `flex-shrink: 0` | Item does not shrink below its content size. |
| `.ion-flex-shrink-1` | `flex-shrink: 1` | Item shrinks proportionally when container is too small. |
-### Order
+### Order {/* #order */}
The [order](https://developer.mozilla.org/en-US/docs/Web/CSS/order) CSS property sets the order to lay out an item in a flex or grid container. Items in a container are sorted by ascending `order` value and then by their source code order. Items not given an explicit `order` value are assigned the default value of `0`.
@@ -547,7 +547,7 @@ Ionic provides the following utility classes for `order`:
| `.ion-order-12` | `order: 12` | Item appears after items with order 11. |
| `.ion-order-last` | `order: 13` | Item appears last in the flex container. |
-### Responsive Flex Item Classes
+### Responsive Flex Item Classes {/* #responsive-flex-item-classes */}
All of the flex item classes listed above have additional classes to modify the properties based on the screen size. Instead of the base class name, use `{property}-{breakpoint}-{modifier}` to only use the class on specific screen sizes, where `{breakpoint}` is one of the breakpoint names listed in [Ionic Breakpoints](#ionic-breakpoints).
@@ -561,7 +561,7 @@ The table below shows the default behavior, where `{property}` is one of the fol
| `.ion-{property}-lg-{modifier}` | Applies the modifier to the element when `min-width: 992px`. |
| `.ion-{property}-xl-{modifier}` | Applies the modifier to the element when `min-width: 1200px`. |
-## Border Display
+## Border Display {/* #border-display */}
The `.ion-no-border` utility class can be used to remove borders from Ionic components. This class can be applied to the `ion-header` and `ion-footer` components.
@@ -583,7 +583,7 @@ The `.ion-no-border` utility class can be used to remove borders from Ionic comp
| ---------------- | -------------------------------- |
| `.ion-no-border` | The element will have no border. |
-## Ionic Breakpoints
+## Ionic Breakpoints {/* #ionic-breakpoints */}
Ionic uses breakpoints in media queries in order to style an application differently based on the screen size. The following breakpoint names are used in the utility classes listed above, where the class will apply when the width is met.
diff --git a/versioned_docs/version-v9/layout/dynamic-font-scaling.mdx b/versioned_docs/version-v9/layout/dynamic-font-scaling.mdx
index acea28c2c55..f042b9e43c7 100644
--- a/versioned_docs/version-v9/layout/dynamic-font-scaling.mdx
+++ b/versioned_docs/version-v9/layout/dynamic-font-scaling.mdx
@@ -2,7 +2,7 @@
Dynamic Font Scaling is a feature that allows users to choose the size of the text displayed on the screen. This helps users who need larger text for better readability, and it also accommodates users who can read smaller text.
-## Try It Out
+## Try It Out {/* #try-it-out */}
:::tip
@@ -18,19 +18,19 @@ import DynamicFontScaling from '@site/static/usage/v9/layout/dynamic-font-scalin
-## Using Dynamic Font Scaling
+## Using Dynamic Font Scaling {/* #using-dynamic-font-scaling */}
-### Enabling in an Application
+### Enabling in an Application {/* #enabling-in-an-application */}
Dynamic Font Scaling is enabled by default as long as the [typography.css](/layout/global-stylesheets.mdx#typographycss) file is imported. Importing this file will define the `--ion-dynamic-font` variable which will activate Dynamic Font Scaling. While not recommended, developers can opt-out of Dynamic Font Scaling by setting this variable to `initial` in their application code.
-### Integrating Custom Components
+### Integrating Custom Components {/* #integrating-custom-components */}
Developers can configure their custom components to take advantage of Dynamic Font Scaling by converting any `font-size` declarations that use `px` units to use [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths) instead. An easy way to convert from `px` to `rem` is to divide the pixel font size by the default browser font size, which is typically `16px`. For example, if a component has a font size of `14px`, then this could be converted to `rem` by doing `14px / 16px = 0.875rem`. Also note that any Ionic components that have had their font sizes overridden should also be updated to use `rem` units.
One thing to keep in mind is that the dimensions of your components may need to change to accommodate the larger font sizes. For example, `width` and `height` properties may need to change to `min-width` and `min-height`, respectively. Developers should audit their applications for any CSS properties that use [length values](https://developer.mozilla.org/en-US/docs/Web/CSS/length) and make any applicable conversions from `px` to `rem`. We also recommend having long text wrap to the next line instead of truncating to keep large text readable.
-### Custom Font Family
+### Custom Font Family {/* #custom-font-family */}
We recommend using the default fonts in Ionic as they are designed to look good at any size and ensure consistency with other mobile apps. However, developers can use a custom font family with Dynamic Font Scaling via CSS:
@@ -41,7 +41,7 @@ html {
}
```
-### `em` units versus `rem` units
+### `em` units versus `rem` units {/* #em-units-versus-rem-units */}
Developers have two options for relative font sizes: [`em` and `rem`](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#ems_and_rems).
@@ -93,11 +93,11 @@ In the following example, the computed font size of `.child` is `32px` because t
}
```
-## How Dynamic Font Scaling works in Ionic
+## How Dynamic Font Scaling works in Ionic {/* #how-dynamic-font-scaling-works-in-ionic */}
Ionic components that define font sizes and participate in Dynamic Font Scaling typically use [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths). This sizes the text in each component relative to the font size of the root element, which is usually the `html` element. This means that as the root element's font size changes, the text in all Ionic components scale in a consistent manner. This avoids the need to manually override each component's font size. Some elements inside of these components, such as icons, use `em` units instead so the elements are sized relative to the text, though the text itself is sized using `rem` units.
-### iOS
+### iOS {/* #ios */}
Dynamic Font Scaling in Ionic builds on top of an iOS feature called [Dynamic Type](https://developer.apple.com/documentation/uikit/uifont/scaling_fonts_automatically#overview). To do this, Ionic sets the [font](https://developer.mozilla.org/en-US/docs/Web/CSS/font) of the root element to an Apple-defined text style. For consistency, Ionic uses the [body](https://developer.apple.com/documentation/uikit/uifont/textstyle/1616682-body) text style.
@@ -109,7 +109,7 @@ Ionic follows [Apple's Human Interface Guidelines for Typography](https://develo
2. Components such as `ion-badge` and `ion-back-button` will have minimum font sizes so they remain readable.
3. Text in components such as `ion-tab-bar` and `ion-picker` do not participate in Dynamic Font Scaling according to Apple's Human Interface Guidelines.
-### Android Web View
+### Android Web View {/* #android-web-view */}
The Android Web View's font scaling mechanism is always enabled in web content and will automatically scale font sizes defined using the `px` unit. This means that any maximum or minimum font sizes specified using `px` will still be scaled even if the final font size does not align with the maximum or minimum font sizes specified.
@@ -127,7 +127,7 @@ This is larger than our defined maximum of `14px`, so one might assume that the
As a result, this means that the maximum computed font size is actually `21px` since `14 * 1.5 = 21` and therefore the overall computed font size of `.foo` is `21px`.
-### Chrome for Android
+### Chrome for Android {/* #chrome-for-android */}
The Chrome Web Browser on Android behaves differently than the Android Web View. By default, Chrome for Android does not respect the system-level font scale setting. However, the Chromium team is working on a new feature to allow for this. When enabled, this feature will change the `zoom` level of the `html` element which will cause the layout to increase in size in addition to the text.
@@ -135,7 +135,7 @@ Developers can test this behavior by enabling the experimental "Accessibility Pa
See https://bugs.chromium.org/p/chromium/issues/detail?id=645717 for more information.
-### Using Modes on Different Platforms
+### Using Modes on Different Platforms {/* #using-modes-on-different-platforms */}
Each platform has slightly different font scaling behaviors, and the `ios` and `md` modes have been implemented to take advantage of the scaling behaviors on their respective platforms.
@@ -143,17 +143,17 @@ For example, `ios` mode makes use of maximum and minimum font sizes to follow [A
As a result, we strongly recommend using `ios` mode on iOS devices and `md` mode on Android devices when using Dynamic Font Scaling.
-## Changing the Font Size on a Device
+## Changing the Font Size on a Device {/* #changing-the-font-size-on-a-device */}
Font scaling preferences are configured on a per-device basis by the user. This allows the user to scale the font for all applications that support this behavior. This guide shows how to enable font scaling for each platform.
-### iOS
+### iOS {/* #ios-1 */}
Font scaling on iOS can be configured in the Settings app.
Refer to [Apple Support](https://support.apple.com/en-us/102453) for more information.
-### Android
+### Android {/* #android */}
Where users access the font scaling configuration varies across devices, but it is typically found in the "Accessibility" page in the Settings app.
@@ -163,9 +163,9 @@ The Chrome Web Browser on Android has some limitations with respecting system-le
:::
-## Troubleshooting
+## Troubleshooting {/* #troubleshooting */}
-### Dynamic Font Scaling is not working
+### Dynamic Font Scaling is not working {/* #dynamic-font-scaling-is-not-working */}
There are a number of reasons why Dynamic Font Scaling may not have any effect on an app. The following list, while not exhaustive, provides some things to check to debug why Dynamic Font Scaling is not working.
@@ -175,21 +175,21 @@ There are a number of reasons why Dynamic Font Scaling may not have any effect o
4. Verify that your code does not override font sizes on Ionic components. Ionic components that set `font-size` rules will use `rem` units. However, if your app overrides that to use `px`, then that custom rule will need to be converted to use `rem`. Refer to [Integrating Custom Components](#integrating-custom-components) for more information.
5. Verify "Accessibility Page Zoom" is enabled if using Chrome for Android. Refer to [Chrome for Android](#chrome-for-android) for more information.
-### Maximum and minimum font sizes are not being respected on Android
+### Maximum and minimum font sizes are not being respected on Android {/* #maximum-and-minimum-font-sizes-are-not-being-respected-on-android */}
The Android Web View scales any font sizes defined using the `px` unit by the system-level font scale preference. This means that actual font sizes may be larger or smaller than the font sizes defined in [min()](https://developer.mozilla.org/en-US/docs/Web/CSS/min), [max()](https://developer.mozilla.org/en-US/docs/Web/CSS/max), or [clamp()](https://developer.mozilla.org/en-US/docs/Web/CSS/clamp).
Refer to [how font scaling works on Android](#android) for more information.
-### Font sizes are larger/smaller even with Dynamic Font Scaling disabled
+### Font sizes are larger/smaller even with Dynamic Font Scaling disabled {/* #font-sizes-are-largersmaller-even-with-dynamic-font-scaling-disabled */}
Ionic components define font sizes using [rem units](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths) even when Dynamic Font Scaling is disabled. This sizes the text in each component relative to the font size of the root element, which is usually the `html` element. As a result, if the font size of `html` changes, the computed font size of all Ionic components will change too.
-### Scaled Ionic iOS component font sizes do not exactly match native iOS equivalents
+### Scaled Ionic iOS component font sizes do not exactly match native iOS equivalents {/* #scaled-ionic-ios-component-font-sizes-do-not-exactly-match-native-ios-equivalents */}
Certain native iOS components such as the Action Sheet make use of private font scales that Ionic does not have access to. While we try to stay as close as possible to the native behavior, text in some components may render slightly larger or smaller than their native counterparts.
-### The text size in my Ionic app on iOS changed when enabling Dynamic Font Scaling
+### The text size in my Ionic app on iOS changed when enabling Dynamic Font Scaling {/* #the-text-size-in-my-ionic-app-on-ios-changed-when-enabling-dynamic-font-scaling */}
The root element's default font size is typically `16px`. However, Dynamic Font Scaling on iOS devices make use of the ["Body" text style](https://developer.apple.com/design/human-interface-guidelines/typography#Specifications) which has a default font size of `17px`. Since the text in Ionic components is scaled relative to the root element's font size, some text may get larger or smaller when Dynamic Font Scaling is enabled, even if the system-level text scale did not change.
diff --git a/versioned_docs/version-v9/layout/global-stylesheets.mdx b/versioned_docs/version-v9/layout/global-stylesheets.mdx
index 1075494da54..28ffbac6189 100644
--- a/versioned_docs/version-v9/layout/global-stylesheets.mdx
+++ b/versioned_docs/version-v9/layout/global-stylesheets.mdx
@@ -12,60 +12,60 @@ title: Global Stylesheets
While Ionic Framework component styles are self-contained, there are several global stylesheets that should be included in order to use all of Ionic's features. Some of the stylesheets are required in order for an Ionic Framework app to look and behave properly, and others include optional utilities to quickly style your app.
-## Available
+## Available {/* #available */}
-### Required
+### Required {/* #required */}
The following CSS file must be included in order for Ionic Framework to work properly.
-#### core.css
+#### core.css {/* #corecss */}
This file is the only stylesheet that is required in order for Ionic components to work properly. It includes app specific styles, and allows the `color` property to work across components. If this file is not included the colors will not show up and some elements may not appear properly.
-### Recommended
+### Recommended {/* #recommended */}
The following CSS files are recommended to be included in an Ionic Framework app. If they are not included, some elements may have undesired styles. If Ionic Framework components are being used outside of an app, these files may not be necessary.
-#### structure.css
+#### structure.css {/* #structurecss */}
Applies styles to `` and defaults `box-sizing` to `border-box`. It ensures scrolling behaves like native in mobile devices.
-#### typography.css
+#### typography.css {/* #typographycss */}
Typography changes the font-family of the entire document and modifies the font styles for heading elements. It also applies positioning styles to some native text elements. This file is necessary for [Dynamic Font Scaling](./dynamic-font-scaling) to work.
-#### normalize.css
+#### normalize.css {/* #normalizecss */}
Makes browsers render all elements more consistently and in line with modern standards. It is based on [Normalize.css](https://necolas.github.io/normalize.css/).
-### Optional
+### Optional {/* #optional */}
The following set of CSS files are optional and can safely be commented out or removed if the application is not using any of the features.
-#### padding.css
+#### padding.css {/* #paddingcss */}
Adds utility classes to modify the padding or margin on any element, refer to [CSS Utilities](css-utilities.mdx#content-space) for usage information.
-#### float-elements.css
+#### float-elements.css {/* #float-elementscss */}
Adds utility classes to float an element based on the breakpoint and side, refer to [CSS Utilities](css-utilities.mdx#element-placement) for usage information.
-#### text-alignment.css
+#### text-alignment.css {/* #text-alignmentcss */}
Adds utility classes to align the text of an element or adjust the white space based on the breakpoint, refer to [CSS Utilities](css-utilities.mdx#text-align) for usage information.
-#### text-transformation.css
+#### text-transformation.css {/* #text-transformationcss */}
Adds utility classes to transform the text of an element to `uppercase`, `lowercase` or `capitalize` based on the breakpoint, refer to [CSS Utilities](css-utilities.mdx#text-transform) for usage information.
-#### flex-utils.css
+#### flex-utils.css {/* #flex-utilscss */}
Adds utility classes to align flex containers and items, refer to [CSS Utilities](css-utilities.mdx#flex-container-properties) for usage information.
-#### display.css
+#### display.css {/* #displaycss */}
Adds utility classes to hide any element based on the breakpoint, refer to [CSS Utilities](css-utilities.mdx#element-display) for usage information.
-## Usage
+## Usage {/* #usage */}
Refer to [Ionic Packages](../intro/cdn.mdx) for how to include the global stylesheets based on the framework and [CSS Utilities](css-utilities.mdx) for how to use the optional utilities.
diff --git a/versioned_docs/version-v9/layout/structure.mdx b/versioned_docs/version-v9/layout/structure.mdx
index 079d7051844..20c48cba93e 100644
--- a/versioned_docs/version-v9/layout/structure.mdx
+++ b/versioned_docs/version-v9/layout/structure.mdx
@@ -15,9 +15,9 @@ import DocsCards from '@components/global/DocsCards';
Ionic Framework provides several different layouts that can be used to structure an app. From single page layouts, to split pane views and modals.
-## Header and Footer Layout
+## Header and Footer Layout {/* #header-and-footer-layout */}
-### Header
+### Header {/* #header */}
The most simple layout available consists of a [header](../api/header.mdx) and [content](../api/content.mdx). Most pages in an app generally have both of these, but a header is not required in order to use content.
@@ -25,7 +25,7 @@ import Header from '@site/static/usage/v9/header/basic/index.mdx';
-### Footer
+### Footer {/* #footer */}
While a toolbar in a header appears above the content, a footer appears below the content. A header and a footer can also be used together on the same page.
@@ -33,7 +33,7 @@ import Footer from '@site/static/usage/v9/footer/basic/index.mdx';
-## Tabs Layout
+## Tabs Layout {/* #tabs-layout */}
A layout consisting of horizontal [tabs](../api/tabs.mdx) can be used to let the user quickly change between content views. Each tab can contain static content or a navigation stack by using a [router outlet](../api/router-outlet.mdx) or [nav](../api/nav.mdx).
@@ -41,7 +41,7 @@ import Tabs from '@site/static/usage/v9/tabs/router/index.mdx';
-## Menu Layout
+## Menu Layout {/* #menu-layout */}
A standard layout among mobile apps includes the ability to toggle a side [menu](../api/menu.mdx) by clicking a button or swiping it open from the side. Side menus are generally used for navigation, but they can contain any content.
@@ -49,7 +49,7 @@ import Menu from '@site/static/usage/v9/menu/basic/index.mdx';
-## Split Pane Layout
+## Split Pane Layout {/* #split-pane-layout */}
A [split pane](../api/split-pane.mdx) layout has a more complex structure because it can combine the previous layouts. It allows for multiple views to be displayed when the viewport is above a specified breakpoint. If the device's screen size is below a certain size, the split pane view will be hidden.
diff --git a/versioned_docs/version-v9/native-faq.mdx b/versioned_docs/version-v9/native-faq.mdx
index 10c8a9eadfb..3251f29cd22 100644
--- a/versioned_docs/version-v9/native-faq.mdx
+++ b/versioned_docs/version-v9/native-faq.mdx
@@ -5,11 +5,11 @@ slug: /native/faq
# Frequently Asked Question
-## What is Capacitor?
+## What is Capacitor? {/* #what-is-capacitor */}
Capacitor is a native runtime built by the Ionic team that offers web developers the ability to deploy their web apps to a native device. Capacitor is also exposing native device capabilities through JavaScript so developers can access features like native location services, filesystem access, or notifications as if they are interacting with any other JavaScript library.
-## Permission Issues
+## Permission Issues {/* #permission-issues */}
If you're using a plugin, it may require adding additional permissions to your native project after you install the plugin. For instance, the Capacitor Camera plugin requires the following permission for iOS:
@@ -19,6 +19,6 @@ If you're using a plugin, it may require adding additional permissions to your n
You need to manually add those permissions to the `info.plist` in your native project. Otherwise, calls to the native camera API will fail.
-## Unexpected behavior
+## Unexpected behavior {/* #unexpected-behavior */}
If for some reason the plugin does not behave in a way that is unexpected, please [open an issue on our github repo](https://github.com/ionic-team/capacitor-plugins)! Providing a clear issue report along with a reproduction can help get your issue resolved.
diff --git a/versioned_docs/version-v9/native-setup.mdx b/versioned_docs/version-v9/native-setup.mdx
index 03a10ea2864..e4889b192fb 100644
--- a/versioned_docs/version-v9/native-setup.mdx
+++ b/versioned_docs/version-v9/native-setup.mdx
@@ -24,7 +24,7 @@ import TabItem from '@theme/TabItem';
Getting started with Capacitor is fairly straight forward for Ionic developers. Adding plugins to your project is no different than adding any dependencies you may need to a project.
-## Install
+## Install {/* #install */}
To install a plugin, find the plugin you want to use and install it using your package manager, like npm:
@@ -33,7 +33,7 @@ To install a plugin, find the plugin you want to use and install it using your p
$ npm install @capacitor/camera
```
-## Usage
+## Usage {/* #usage */}
Once installed, plugins can be imported into a component and you can call the native functionality directly from your code.
diff --git a/versioned_docs/version-v9/react/add-to-existing.mdx b/versioned_docs/version-v9/react/add-to-existing.mdx
index 95d08079546..d74edc57776 100644
--- a/versioned_docs/version-v9/react/add-to-existing.mdx
+++ b/versioned_docs/version-v9/react/add-to-existing.mdx
@@ -22,7 +22,7 @@ This guide uses TypeScript examples. If you're using JavaScript, the setup proce
:::
-## Setup
+## Setup {/* #setup */}
:::info
@@ -32,13 +32,13 @@ This guide follows the structure of a React app created with Vite. If you starte
Follow these steps to add Ionic React to your existing React project:
-#### 1. Install the Package
+#### 1. Install the Package {/* #1-install-the-package */}
```bash
npm install @ionic/react
```
-#### 2. Configure Ionic React
+#### 2. Configure Ionic React {/* #2-configure-ionic-react */}
Update `src/App.tsx` to include `setupIonicReact` and import the required Ionic Framework stylesheets:
@@ -68,7 +68,7 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography.
:::
-## Using Individual Components
+## Using Individual Components {/* #using-individual-components */}
After completing the setup above, you can start using Ionic components in your existing React app. Here's an example of how to use them:
@@ -106,11 +106,11 @@ If your existing React app imports a global stylesheet (such as `index.css`) in
:::
-## Using Ionic Pages
+## Using Ionic Pages {/* #using-ionic-pages */}
If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
-#### 1. Add Additional Ionic Framework Stylesheets
+#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
Update the imported stylesheets in `src/App.tsx`:
@@ -134,7 +134,7 @@ import '@ionic/react/css/display.css';
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 {/* #2-set-up-theming */}
Create a `src/theme/variables.css` file with the following content:
@@ -171,7 +171,7 @@ setupIonicReact();
The `variables.css` file can be used to create custom Ionic Framework themes. The `dark.system.css` import 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 to `theme/variables.css`.
-#### 3. Update the App Component
+#### 3. Update the App Component {/* #3-update-the-app-component */}
Update `src/App.tsx` to the following:
@@ -224,7 +224,7 @@ const App = () => {
export default App;
```
-#### 4. Create a Home Page
+#### 4. Create a Home Page {/* #4-create-a-home-page */}
Create a new file at `src/pages/Home.tsx` with the following:
@@ -298,7 +298,7 @@ Then, create `src/pages/Home.css`:
}
```
-#### 5. Set up Routing
+#### 5. Set up Routing {/* #5-set-up-routing */}
:::important
@@ -340,7 +340,7 @@ export default App;
You're all set! Your Ionic React app is now configured with full Ionic page support. Run `npm run dev` to start your development server and view your app.
-## Next Steps
+## Next Steps {/* #next-steps */}
Now that you have Ionic React integrated into your project, check out:
diff --git a/versioned_docs/version-v9/react/lifecycle.mdx b/versioned_docs/version-v9/react/lifecycle.mdx
index 3501dec7cd7..da588fecda9 100644
--- a/versioned_docs/version-v9/react/lifecycle.mdx
+++ b/versioned_docs/version-v9/react/lifecycle.mdx
@@ -13,7 +13,7 @@ sidebar_label: Lifecycle
This guide discusses how to use the Ionic Lifecycle events in an Ionic React application.
-## Ionic Lifecycle Methods
+## Ionic Lifecycle Methods {/* #ionic-lifecycle-methods */}
Ionic provides a few lifecycle methods that you can use in your apps:
@@ -28,7 +28,7 @@ These lifecycles are only called on components directly mapped by a router. This
The way you access these methods varies based on if you are using class-based components or functional components. We cover both methods below.
-## Lifecycle Methods in Class-Based Components
+## Lifecycle Methods in Class-Based Components {/* #lifecycle-methods-in-class-based-components */}
to use the Ionic Lifecycle methods in a class-based component, you must wrap your component with the `withIonLifeCycle` higher order component (HOC) like so:
@@ -82,7 +82,7 @@ class HomePage extends React.Component {
export default withIonLifeCycle(HomePage);
```
-## Lifecycle Methods in Functional Components
+## Lifecycle Methods in Functional Components {/* #lifecycle-methods-in-functional-components */}
Ionic React exports hooks for each of the lifecycle methods that you can use in your functional components. Each of the hooks takes the method you want called when the event fires.
@@ -147,11 +147,11 @@ useIonViewDidEnter(() => {
}, [data]);
```
-## React LifeCycle Methods
+## React LifeCycle Methods {/* #react-lifecycle-methods */}
All the lifecycle methods in React (`componentDidMount`, `componentWillUnmount`, etc..) are available for you to use as well. However, since Ionic React manages the lifetime of a page, certain events might not fire when you expect them to. For instance, `componentDidMount` fires the first time a page is displayed, but if you navigate away from the page Ionic might keep the page around in the DOM, and a subsequent visit to the page might not call `componentDidMount` again. This scenario is the main reason the Ionic lifecycle methods exist, to still give you a way to call logic when views enter and exit when the native framework's events might not fire.
-## Guidance for Each LifeCycle Method
+## Guidance for Each LifeCycle Method {/* #guidance-for-each-lifecycle-method */}
Below are some tips on use cases for each of the life cycle events.
@@ -160,7 +160,7 @@ Below are some tips on use cases for each of the life cycle events.
- `ionViewWillLeave` - Can be used for cleanup, like unsubscribing from data sources. Since `componentWillUnmount` might not fire when you navigate from the current page, put your cleanup code here if you don't want it active while the screen is not in view.
- `ionViewDidLeave` - When this event fires, you know the new page has fully transitioned in, so any logic you might not normally do when the view is visible can go here.
-## Passing state between pages
+## Passing state between pages {/* #passing-state-between-pages */}
Since Ionic React manages the lifetime of a page, state on previous pages may update as users navigate your application. This can impact state that is determined using `useEffect` from React or `useLocation` from React Router. For example, if `PageA` calls `useLocation`, the state of `useLocation` will change when the user navigates from `PageA` to `PageB`.
diff --git a/versioned_docs/version-v9/react/navigation.mdx b/versioned_docs/version-v9/react/navigation.mdx
index 0557db6278d..88ea09bff2c 100644
--- a/versioned_docs/version-v9/react/navigation.mdx
+++ b/versioned_docs/version-v9/react/navigation.mdx
@@ -19,7 +19,7 @@ This guide covers how routing works in an app built with Ionic and React.
Everything you know about routing using React Router carries over into Ionic React. Let's walk through the basics of an Ionic React app and how routing works with it.
-## Routing in Ionic React
+## Routing in Ionic React {/* #routing-in-ionic-react */}
Here is a sample `App` component that defines a single route to the "/dashboard" URL. When you visit "/dashboard", the route renders the `DashboardPage` component.
@@ -46,11 +46,11 @@ You can also conditionally redirect based on a condition, like checking if a use
: } />
```
-## IonReactRouter
+## IonReactRouter {/* #ionreactrouter */}
The `IonReactRouter` component wraps the traditional [`BrowserRouter`](https://reactrouter.com/6.28.0/router-components/browser-router) component from React Router, and sets the app up for routing. Therefore, use `IonReactRouter` in place of `BrowserRouter`. You can pass in any props to `IonReactRouter` and they will be passed down to the underlying `BrowserRouter`.
-## Nested Routes
+## Nested Routes {/* #nested-routes */}
Inside the Dashboard page, we define more routes related to this specific section of the app:
@@ -71,9 +71,9 @@ Note the `ionPage` prop on `IonRouterOutlet`. When a component serves as a neste
These routes are grouped in an `IonRouterOutlet`, let's discuss that next.
-## Components
+## Components {/* #components */}
-### IonRouterOutlet
+### IonRouterOutlet {/* #ionrouteroutlet */}
The `IonRouterOutlet` component provides a container for Routes that render Ionic "pages". When a page is in an `IonRouterOutlet`, the container controls the transition animation between the pages as well as controls when a page is created and destroyed, which helps maintain the state between the views when switching back and forth between them.
@@ -81,7 +81,7 @@ The `DashboardPage` above shows a users list page and a details page. When navig
An `IonRouterOutlet` should only contain `Route`s. Any other component should be rendered either as a result of a `Route` or outside of the `IonRouterOutlet`.
-### Fallback Route
+### Fallback Route {/* #fallback-route */}
A common routing use case is to provide a "fallback" route to be rendered in the event the location navigated to does not match any of the routes defined.
@@ -113,7 +113,7 @@ const DashboardPage: React.FC = () => (
);
```
-### IonPage
+### IonPage {/* #ionpage */}
The `IonPage` component wraps each view in an Ionic React app and allows page transitions and stack navigation to work properly. Each view that is navigated to using the router must include an `IonPage` component.
@@ -138,7 +138,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Navigation
+## Navigation {/* #navigation */}
There are several options available when routing to different views in an Ionic React app. Here, the `UsersListPage` uses `IonItem`'s `routerLink` prop to specify the route to go to when the item is tapped/clicked:
@@ -201,7 +201,7 @@ const MyComponent: React.FC = () => {
};
```
-### Navigating using `navigate` with delta
+### Navigating using `navigate` with delta {/* #navigating-using-navigate-with-delta */}
React Router's `navigate` function can accept a delta number to move forward or backward through the application history.
@@ -213,7 +213,7 @@ If you were to call `navigate(-2)` on `/pageC`, you would be brought back to `/p
Using `navigate()` with delta values is not recommended in Ionic React because it follows the browser's linear history, which does not account for Ionic's non-linear tab and nested outlet navigation stacks. Use the `useIonRouter` hook's [`goBack()`](./utility-functions.mdx#back-navigation) method instead, which navigates within the current Ionic navigation stack.
-## URL Parameters
+## URL Parameters {/* #url-parameters */}
The second route defined in the Dashboard Page has a URL parameter defined (the ":id" portion in the path). URL parameters are dynamic portions of the `path`, and when the user navigates to a URL such as "/dashboard/users/1", the "1" is saved to a parameter named "id", which can be accessed in the component the route renders. Let's walk through how that's done.
@@ -242,9 +242,9 @@ The [`useParams`](https://reactrouter.com/6.28.0/hooks/use-params) hook returns
Note how we use a TypeScript generic to strongly type the params object. This gives us type safety and code completion inside of the component.
-## Linear Routing versus Non-Linear Routing
+## Linear Routing versus Non-Linear Routing {/* #linear-routing-versus-non-linear-routing */}
-### Linear Routing
+### Linear Routing {/* #linear-routing */}
If you have built a web app that uses routing, you likely have used linear routing before. Linear routing means that you can move forward or backward through the application history by pushing and popping pages.
@@ -268,7 +268,7 @@ When we press the back button, we follow that same routing path except in revers
The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.
-### Non-Linear Routing
+### Non-Linear Routing {/* #non-linear-routing */}
Non-linear routing is a concept that may be new to many web developers learning to build mobile apps with Ionic.
@@ -296,7 +296,7 @@ If tapping the back button simply called `navigate(-1)` from the `Ted Lasso` vie
Non-linear routing allows for sophisticated user flows that linear routing cannot handle. However, certain linear routing APIs such as `navigate()` with delta values cannot be used in this non-linear environment. This means that `navigate(-1)` or similar delta navigation should not be used when using tabs or nested outlets.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose */}
We recommend keeping your application as simple as possible until you need to add non-linear routing. Non-linear routing is very powerful, but it also adds a considerable amount of complexity to mobile applications.
@@ -306,11 +306,11 @@ For more on tabs, refer to [Working with Tabs](#working-with-tabs).
For more on nested router outlets, refer to [Nested Routes](#nested-routes).
-## Shared URLs versus Nested Routes
+## Shared URLs versus Nested Routes {/* #shared-urls-versus-nested-routes */}
A common point of confusion when setting up routing is deciding between shared URLs or nested routes. This part of the guide will explain both and help you decide which one to use.
-### Shared URLs
+### Shared URLs {/* #shared-urls */}
Shared URLs is a route configuration where routes have pieces of the URL in common. The following is an example of a shared URL configuration:
@@ -329,7 +329,7 @@ const App: React.FC = () => (
The above routes are considered "shared" because they reuse the `dashboard` piece of the URL. Since these routes are flat siblings in the same `IonRouterOutlet` (not nested), they don't need a `/*` suffix.
-### Nested Routes
+### Nested Routes {/* #nested-routes-1 */}
Nested Routes is a route configuration where routes are listed as children of other routes. The following is an example of a nested route configuration:
@@ -354,7 +354,7 @@ const DashboardRouterOutlet: React.FC = () => (
The above routes are nested because they are rendered inside the `DashboardRouterOutlet` component, which is a child of the parent route. The parent route uses a `/*` suffix to match all sub-paths, and the nested `IonRouterOutlet` renders the appropriate child route.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose-1 */}
Shared URLs are great when you want to transition from page A to page B while preserving the relationship between the two pages in the URL. In our previous example, a button on the `/dashboard` page could transition to the `/dashboard/stats` page. The relationship between the two pages is preserved because of a) the page transition and b) the url.
@@ -362,7 +362,7 @@ Nested routes should be used when you want to render content in outlet A while a
There are very few use cases in which nested routes make sense in mobile applications. When in doubt, use the shared URL route configuration. We strongly caution against using nested routing in contexts other than tabs as it can quickly make navigating your app confusing.
-## Working with Tabs
+## Working with Tabs {/* #working-with-tabs */}
When working with tabs, Ionic needs a way to know which view belongs to which tab. The `IonTabs` component comes in handy here, but let's examine the routing setup for this:
@@ -425,7 +425,7 @@ If you have worked with Ionic Framework before, this should feel familiar. We cr
:::
-### How Tabs in Ionic Work
+### How Tabs in Ionic Work {/* #how-tabs-in-ionic-work */}
Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
@@ -433,7 +433,7 @@ This behavior is important to note as it is different than most tab implementati
Since Ionic is focused on helping developers build mobile apps, the tabs in Ionic are designed to match native mobile tabs as closely as possible. As a result, there may be certain behaviors in Ionic's tabs that differ from tabs implementations in other UI libraries. Read on to learn more about some of these differences.
-### Child Routes within Tabs
+### Child Routes within Tabs {/* #child-routes-within-tabs */}
When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `tab1/view` route as a sibling of the `tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `IonTabBar`.
@@ -463,7 +463,7 @@ When adding additional routes to tabs you should write them as sibling routes wi
```
-### Switching Between Tabs
+### Switching Between Tabs {/* #switching-between-tabs */}
Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
@@ -501,13 +501,13 @@ The example below shows how the Spotify app reuses the same album component to s
| :-------------------------------------------------: | :---------------------------------------------------: |
| | |
-## Live Example
+## Live Example {/* #live-example */}
import NavigationPlayground from '@site/static/usage/v9/navigation/index.mdx';
-### IonRouterOutlet in a Tabs View
+### IonRouterOutlet in a Tabs View {/* #ionrouteroutlet-in-a-tabs-view */}
When working in a tabs view, Ionic React needs a way to determine what views belong to which tabs. It does this by matching the path prefix of each route.
@@ -523,7 +523,7 @@ For example, the routes for a view with two tabs (sessions and speakers) can be
When a user navigates to a session detail page ("/sessions/1" for instance), `IonRouterOutlet` sees that both the list and detail pages share the same "sessions" path prefix and provides an animated page transition to the new view. If a user navigates to a different tab ("speakers" in this case), `IonRouterOutlet` knows not to provide the animation.
-## More Information
+## More Information {/* #more-information */}
For more info on routing in React using the React Router implementation that Ionic uses under the hood, check out their docs at [https://reactrouter.com/6.28.0](https://reactrouter.com/6.28.0).
diff --git a/versioned_docs/version-v9/react/overlays.mdx b/versioned_docs/version-v9/react/overlays.mdx
index da08888461b..6bef22fbe11 100644
--- a/versioned_docs/version-v9/react/overlays.mdx
+++ b/versioned_docs/version-v9/react/overlays.mdx
@@ -6,7 +6,7 @@ sidebar_label: Overlays
For Ionic React, there are two techniques you can use to display overlay components like modals, alerts, action sheets, etc. In this guide, we will go over both of them.
-## Overlay Hooks
+## Overlay Hooks {/* #overlay-hooks */}
Starting in Ionic React 5.6, we introduced new React hooks you can use to control displaying and dismissing overlays. These hooks provide a programmatic way of controlling the overlays, as well as a way to use overlays outside of your Ionic Page without the need of a state management system.
@@ -66,7 +66,7 @@ const [present, dismiss] = useIonModal(Greeting, { name: 'Dave' });
Passing a JSX element instead of a component binds the props to the element, and `componentProps` is not type checked.
-## Overlay Components
+## Overlay Components {/* #overlay-components */}
Overlays can also be displayed by using components from `@ionic/react`. The components take a `isOpen` prop that you provide to control if the overlay is currently being displayed or not. When `isOpen` switches from true to false (and vise versa), Ionic will open/close the overlay with the appropriate animation. You can also supply any other additional config options as props to the overlay:
@@ -92,7 +92,7 @@ The Overlay Components are still a valid way of displaying overlays and are in n
:::
-## Docs for Overlays in Ionic
+## Docs for Overlays in Ionic {/* #docs-for-overlays-in-ionic */}
For full docs and usage examples for both the hook and component approach, visit the docs page for each of the overlays in Ionic:
diff --git a/versioned_docs/version-v9/react/overview.mdx b/versioned_docs/version-v9/react/overview.mdx
index 178ee6af6cd..c355aae9375 100644
--- a/versioned_docs/version-v9/react/overview.mdx
+++ b/versioned_docs/version-v9/react/overview.mdx
@@ -16,19 +16,19 @@ import DocsCards from '@components/global/DocsCards';
`@ionic/react` brings the full power of the Ionic Framework to React developers. It offers seamless integration with the React ecosystem, so you can build high-quality cross-platform apps using familiar React tools, components, and best practices. You also get access to Ionic's extensive UI library and native capabilities.
-## React Version Support
+## React Version Support {/* #react-version-support */}
Ionic React supports the latest versions of React. For detailed information on supported versions and our support policy, refer to the [Ionic React Support Policy](/reference/support.mdx#ionic-react).
-## React Tooling
+## React Tooling {/* #react-tooling */}
Ionic React works seamlessly with the React CLI and popular React tooling. You can use your favorite libraries for state management, testing, and more. Ionic React is designed to fit naturally into the React ecosystem, so you can use tools like Create React App, Vite, or Next.js to scaffold and build your apps.
-## Native Tooling
+## Native Tooling {/* #native-tooling */}
[Capacitor](https://capacitorjs.com) is the official cross-platform runtime for Ionic Angular, enabling your apps to run natively on iOS, Android, and the web with a single codebase.
-## Installation
+## Installation {/* #installation */}
```shell-session
$ npm install -g @ionic/cli
@@ -38,7 +38,7 @@ $ cd myApp
$ ionic serve █
```
-## Resources
+## Resources {/* #resources */}
diff --git a/versioned_docs/version-v9/react/performance.mdx b/versioned_docs/version-v9/react/performance.mdx
index c5d029b11aa..013614bc59a 100644
--- a/versioned_docs/version-v9/react/performance.mdx
+++ b/versioned_docs/version-v9/react/performance.mdx
@@ -11,7 +11,7 @@ sidebar_label: Performance
/>
-## Loops with Ionic Components
+## Loops with Ionic Components {/* #loops-with-ionic-components */}
When using loops with Ionic components, we recommend using React's `key` attribute. This allows React to re-render loop elements in an efficient way by only updating the content inside of the component rather than re-creating the component altogether.
diff --git a/versioned_docs/version-v9/react/platform.mdx b/versioned_docs/version-v9/react/platform.mdx
index eb391d04795..83d1a62e597 100644
--- a/versioned_docs/version-v9/react/platform.mdx
+++ b/versioned_docs/version-v9/react/platform.mdx
@@ -1,6 +1,6 @@
# Platform
-## isPlatform
+## isPlatform {/* #isplatform */}
The `isPlatform` method can be used to test if your app is running on a certain platform:
@@ -12,7 +12,7 @@ isPlatform('ios'); // returns true when running on a iOS device
Depending on the platform the user is on, isPlatform(platformName) will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: mobile, ios, ipad, and tablet. Additionally, if the app was running from Cordova then cordova would be true.
-## getPlatforms
+## getPlatforms {/* #getplatforms */}
The `getPlatforms` method can be used to determine which platforms your app is currently running on.
@@ -24,7 +24,7 @@ getPlatforms(); // returns ["iphone", "ios", "mobile", "mobileweb"] from an iPho
Depending on what device you are on, `getPlatforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return mobile, ios, and iphone.
-## Platforms
+## Platforms {/* #platforms */}
Below is a table listing all the possible platform values along with corresponding descriptions.
@@ -45,7 +45,7 @@ Below is a table listing all the possible platform values along with correspondi
| pwa | a PWA app |
| tablet | a tablet device |
-## Customizing Platform Detection Functions
+## 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.
diff --git a/versioned_docs/version-v9/react/pwa.mdx b/versioned_docs/version-v9/react/pwa.mdx
index d7d74f57fd1..9ffbcfe2afc 100644
--- a/versioned_docs/version-v9/react/pwa.mdx
+++ b/versioned_docs/version-v9/react/pwa.mdx
@@ -11,7 +11,7 @@ sidebar_label: Progressive Web Apps
/>
-## Making your React app a PWA with Vite
+## Making your React app a PWA with Vite {/* #making-your-react-app-a-pwa-with-vite */}
The two main requirements of a PWA are a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) and a [Web Application Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/). While it's possible to add both of these to an app manually, we recommend using the [Vite PWA Plugin](https://vite-pwa-org.netlify.app/) instead.
@@ -39,7 +39,7 @@ For more information on configuring the Vite PWA Plugin, refer to the [Vite PWA
Refer to the [Vite PWA "Deploy" Guide](https://vite-pwa-org.netlify.app/deployment/) for information on how to deploy your PWA.
-## Making your React app a PWA with Create React App
+## Making your React app a PWA with Create React App {/* #making-your-react-app-a-pwa-with-create-react-app */}
:::note
@@ -85,15 +85,15 @@ Features like Service Workers and many JavaScript APIs (such as geolocation) req
:::
-### Service Worker configuration
+### Service Worker configuration {/* #service-worker-configuration */}
By default, CRA/React Scripts come with a preconfigured Service Worker setup based on [Workbox's Webpack plugin](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin). This utilizes a cache-first strategy, meaning that your app will load from a cache, even if the network returns a newer version of the app.
Because of the nature of CRA/React Scripts, the configuration for this is internal to React Scripts, meaning that it cannot be customized without ejecting from React Scripts. Currently, the Ionic CLI does not support an ejected React App, so if this action is taken, you'll need to use npm/yarn scripts instead of the Ionic CLI.
-### Deploying
+### Deploying {/* #deploying */}
-#### Firebase
+#### Firebase {/* #firebase */}
Firebase hosting provides many benefits for Progressive Web Apps, including fast response times thanks to CDNs, HTTPS enabled by default, and support for [HTTP2 push](https://firebase.googleblog.com/2016/09/http2-comes-to-firebase-hosting.html).
diff --git a/versioned_docs/version-v9/react/quickstart.mdx b/versioned_docs/version-v9/react/quickstart.mdx
index 3bd67d309c3..972203a096a 100644
--- a/versioned_docs/version-v9/react/quickstart.mdx
+++ b/versioned_docs/version-v9/react/quickstart.mdx
@@ -18,7 +18,7 @@ Welcome! This guide will walk you through the basics of Ionic React development.
If you're looking for a high-level overview of what Ionic React is and how it fits into the React ecosystem, refer to the [Ionic React Overview](overview).
-## Prerequisites
+## Prerequisites {/* #prerequisites */}
Before you begin, make sure you have Node.js and npm installed on your machine.
You can check by running:
@@ -30,7 +30,7 @@ npm -v
If you don't have Node.js and npm, [download Node.js](https://nodejs.org/en/download) (which includes npm).
-## Create a Project with the Ionic CLI
+## Create a Project with the Ionic CLI {/* #create-a-project-with-the-ionic-cli */}
First, install the latest [Ionic CLI](../cli):
@@ -51,7 +51,7 @@ After running `ionic serve`, your project will open in the browser.

-## Explore the Project Structure
+## Explore the Project Structure {/* #explore-the-project-structure */}
Your new app's directory will look like this:
@@ -75,7 +75,7 @@ All file paths in the examples below are relative to the project root directory.
Let's walk through these files to understand the app's structure.
-## View the App Component
+## View the App Component {/* #view-the-app-component */}
The root of your app is defined in `App.tsx`:
@@ -105,7 +105,7 @@ export default App;
This sets up the root of your application, using Ionic's `IonApp` and `IonReactRouter` components. The `IonRouterOutlet` is where your pages will be displayed.
-## View Routes
+## View Routes {/* #view-routes */}
Routes are defined within the `IonRouterOutlet` in `App.tsx`:
@@ -118,7 +118,7 @@ Routes are defined within the `IonRouterOutlet` in `App.tsx`:
When you visit the root URL (`/`), the `Home` component will be loaded.
-## View the Home Page
+## View the Home Page {/* #view-the-home-page */}
The Home page component, defined in `Home.tsx`, imports the Ionic components and defines the page template:
@@ -158,7 +158,7 @@ For detailed information about Ionic layout components, refer to the [Header](/a
:::
-## Add an Ionic Component
+## Add an Ionic Component {/* #add-an-ionic-component */}
You can enhance your Home page with more Ionic UI components. For example, import and add a [Button](/api/button.mdx) at the end of the `IonContent` in `Home.tsx`:
@@ -186,7 +186,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Add a New Page
+## Add a New Page {/* #add-a-new-page */}
Create a new page at `New.tsx`:
@@ -226,7 +226,7 @@ When creating your own pages, always use `IonPage` as the root component. This i
:::
-## Navigate to the New Page
+## Navigate to the New Page {/* #navigate-to-the-new-page */}
To navigate to the new page, create a route for it by first importing it at the top of `App.tsx` after the `Home` import:
@@ -256,7 +256,7 @@ Navigating can also be performed programmatically using the `useIonRouter` hook.
:::
-## Add Icons to the New Page
+## Add Icons to the New Page {/* #add-icons-to-the-new-page */}
Ionic React comes with [Ionicons](https://ionic.io/ionicons/) pre-installed. You can use any icon by setting the `icon` property of the `IonIcon` component.
@@ -278,7 +278,7 @@ Note that we are passing the imported SVG reference, **not** the icon name as a
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 {/* #call-component-methods */}
Let's add a button that can scroll the content area to the bottom.
@@ -331,7 +331,7 @@ This pattern is necessary because React refs store the component instance in the
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 {/* #run-on-a-device */}
Ionic's components work everywhere: on iOS, Android, and PWAs. To deploy to mobile, use [Capacitor](https://capacitorjs.com):
@@ -350,7 +350,7 @@ ionic cap open android
Refer to [Capacitor's Getting Started guide](https://capacitorjs.com/docs/getting-started/with-ionic) for more.
-## Explore More
+## Explore More {/* #explore-more */}
This guide covered the basics of creating an Ionic React app, adding navigation, and introducing Capacitor for native builds. To dive deeper, check out:
diff --git a/versioned_docs/version-v9/react/slides.mdx b/versioned_docs/version-v9/react/slides.mdx
index e5dffb8625d..d6625d33c44 100644
--- a/versioned_docs/version-v9/react/slides.mdx
+++ b/versioned_docs/version-v9/react/slides.mdx
@@ -26,7 +26,7 @@ Using Swiper's React component is **not** required to use Swiper.js with Ionic F
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
First, update to the latest version of Ionic:
@@ -46,7 +46,7 @@ Developers using Create React App must use `react-scripts` v5.0.0+ with the late
:::
-## Swiping with Style
+## Swiping with Style {/* #swiping-with-style */}
Next, we need to import the base Swiper styles. We are also going to import the styles that Ionic provides which will let us customize the Swiper styles using the same CSS Variables that we used with `IonSlides`.
@@ -74,7 +74,7 @@ Importing `@ionic/react/css/ionic-swiper.css` is **not** required to use Swiper.
:::
-### Updating Selectors
+### Updating Selectors {/* #updating-selectors */}
Previously, we were able to target `ion-slides` and `ion-slide` to apply any custom styling. The contents of those style blocks remain the same, but we need to update the selectors. Below is a list of selector changes when going from `ion-slides` to Swiper React:
@@ -83,7 +83,7 @@ Previously, we were able to target `ion-slides` and `ion-slide` to apply any cus
| `ion-slides` | `.swiper` |
| `ion-slide` | `.swiper-slide` |
-### Pre-processors (optional)
+### Pre-processors (optional) {/* #pre-processors-optional */}
For developers using SCSS or Less styles, Swiper also provides imports for those files.
@@ -123,7 +123,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Using Components
+## Using Components {/* #using-components */}
Swiper exports two components: `Swiper` and `SwiperSlide`. The `Swiper` component is the equivalent of `IonSlides`, and `SwiperSlide` is the equivalent of `IonSlide`.
@@ -153,7 +153,7 @@ const Home: React.FC = () => {
export default Home;
```
-## Using Modules
+## Using Modules {/* #using-modules */}
By default, Swiper for React does not import any additional modules. To use modules such as Navigation or Pagination, you need to import them first.
@@ -268,7 +268,7 @@ Refer to [Swiper's React usage documentation](https://swiperjs.com/react#usage)
:::
-## The IonicSlides Module
+## The IonicSlides Module {/* #the-ionicslides-module */}
With `IonSlides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
@@ -319,7 +319,7 @@ The `IonicSlides` module must be the last module in the array. This will let it
:::
-## Properties
+## Properties {/* #properties */}
Swiper options are provided as props directly on the `` component rather than via the `options` object in `IonSlides`.
@@ -371,7 +371,7 @@ All properties available in Swiper React can be found in the [Swiper React props
:::
-## Events
+## Events {/* #events */}
Since the `Swiper` component is not provided by Ionic Framework, event names will not have an `onIonSlide` prefix to them.
@@ -430,7 +430,7 @@ All events available in Swiper can be found in the [Swiper API events documentat
:::
-## Methods
+## Methods {/* #methods */}
Most methods have been removed in favor of accessing the `Swiper` props directly.
@@ -473,7 +473,7 @@ Below is a full list of method changes when going from `IonSlides` to Swiper Rea
| `startAutoplay()` | Use the `autoplay` property instead. |
| `stopAutoplay()` | Use the `autoplay` property instead. |
-## Effects
+## Effects {/* #effects */}
If you are using effects such as Cube or Fade, you can install them just like we did with the other modules. In this example, we will use the fade effect. To start, we will import `EffectFade` from `swiper` and provide it in the `modules` array:
@@ -564,21 +564,21 @@ For more information on effects in Swiper, please refer to the [Swiper React eff
:::
-## Wrap Up
+## Wrap Up {/* #wrap-up */}
Now that you have Swiper installed, there is a whole set of new Swiper features for you to enjoy. We recommend starting with the [Swiper React Introduction](https://swiperjs.com/react) and then referencing [the Swiper API docs](https://swiperjs.com/swiper-api).
-## FAQ
+## FAQ {/* #faq */}
-### Where can I find an example of this migration?
+### Where can I find an example of this migration? {/* #where-can-i-find-an-example-of-this-migration */}
You can find a sample app with `ion-slides` and the equivalent Swiper usage at https://github.com/ionic-team/slides-migration-samples.
-### Where can I get help with this migration?
+### Where can I get help with this migration? {/* #where-can-i-get-help-with-this-migration */}
If you are running into issues with the migration, please create a post on the [Ionic Forum](https://forum.ionicframework.com/).
-### Where do I file bug reports?
+### Where do I file bug reports? {/* #where-do-i-file-bug-reports */}
Before opening an issue, please consider creating a post on the [Swiper Discussion Board](https://github.com/nolimits4web/swiper/discussions) or the [Ionic Forum](https://forum.ionicframework.com) to check if your issue can be resolved by the community.
diff --git a/versioned_docs/version-v9/react/storage.mdx b/versioned_docs/version-v9/react/storage.mdx
index 81cb1632d5d..69511d121f7 100644
--- a/versioned_docs/version-v9/react/storage.mdx
+++ b/versioned_docs/version-v9/react/storage.mdx
@@ -21,18 +21,18 @@ Some storage options involve third-party plugins or products. In such cases, we
Here are some common use cases and solutions:
-## Local Application Settings and Data
+## Local Application Settings and Data {/* #local-application-settings-and-data */}
Many applications need to locally store settings as well as other lightweight key/value data. The [Capacitor Preferences](https://capacitorjs.com/docs/apis/preferences) plugin is specifically designed to handle these scenarios.
-## Relational Data Storage (Mobile Only)
+## Relational Data Storage (Mobile Only) {/* #relational-data-storage-mobile-only */}
Some applications, especially those following an offline-first methodology, may require locally storing high volumes of complex relational data. For such scenarios, a SQLite plugin may be used. The most common SQLite plugin offerings are:
- [Cordova SQLite Storage](https://github.com/storesafe/cordova-sqlite-storage) (a [convenience wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/sqlite) also exists for this plugin to aid in implementation)
- [Capacitor Community SQLite Plugin](https://github.com/capacitor-community/sqlite)
-## Non-Relational High Volume Data Storage (Mobile and Web)
+## Non-Relational High Volume Data Storage (Mobile and Web) {/* #non-relational-high-volume-data-storage-mobile-and-web */}
For applications that need to store a high volume of data as well as operate on both web and mobile, a potential solution is to create a key/value pair data storage service that uses [indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) on the web and one of the previously mentioned SQLite plugins on mobile.
@@ -42,7 +42,7 @@ Here a sample of how this can be accomplished:
- [Mobile Service](https://github.com/ionic-enterprise/tutorials-and-demos-react/blob/main/demos/sqlcipher-kv-pair/src/utils/mobile-kv-store.ts)
- [Web Service](https://github.com/ionic-enterprise/tutorials-and-demos-react/blob/main/demos/sqlcipher-kv-pair/src/utils/web-kv-store.ts)
-## Other Options
+## Other Options {/* #other-options */}
Other storage options that provide local as well as cloud-based storage that work well within Capacitor applications also exist and may integrate well with your application.
diff --git a/versioned_docs/version-v9/react/testing/introduction.mdx b/versioned_docs/version-v9/react/testing/introduction.mdx
index 44d6fe6a74a..25698b29563 100644
--- a/versioned_docs/version-v9/react/testing/introduction.mdx
+++ b/versioned_docs/version-v9/react/testing/introduction.mdx
@@ -8,11 +8,11 @@ description: Learn how to test an Ionic React application. This document provide
This document provides an overview of how to test an application built with `@ionic/react`. It covers the basics of testing with React, as well as the specific tools and libraries developers can use to test their applications.
-## Introduction
+## Introduction {/* #introduction */}
Testing is an important part of the development process, and it helps to ensure that an application is working as intended. In `@ionic/react`, testing is done using a combination of tools and libraries, including Jest or Vitest, React Testing Library, Playwright or Cypress.
-## Types of Tests
+## Types of Tests {/* #types-of-tests */}
There are two types of tests that can be written:
diff --git a/versioned_docs/version-v9/react/testing/unit-testing/best-practices.mdx b/versioned_docs/version-v9/react/testing/unit-testing/best-practices.mdx
index 6af22f45d4f..1a705eb4db0 100644
--- a/versioned_docs/version-v9/react/testing/unit-testing/best-practices.mdx
+++ b/versioned_docs/version-v9/react/testing/unit-testing/best-practices.mdx
@@ -4,7 +4,7 @@ sidebar_label: Best Practices
# Best Practices
-## IonApp is required for test templates
+## IonApp is required for test templates {/* #ionapp-is-required-for-test-templates */}
In your test template when rendering with React Testing Library, you must wrap your component with an `IonApp` component. This is required for the component to be rendered correctly.
@@ -24,7 +24,7 @@ test('example', () => {
});
```
-## Use `user-event` for user interactions
+## Use `user-event` for user interactions {/* #use-user-event-for-user-interactions */}
React Testing Library recommends using the `user-event` library for simulating user interactions. This library provides a more realistic simulation of user interactions than the `fireEvent` function provided by React Testing Library.
@@ -50,7 +50,7 @@ test('example', async () => {
For more information on `user-event`, refer to the [user-event documentation](https://testing-library.com/docs/user-event/intro/).
-## Waiting for Components
+## Waiting for Components {/* #waiting-for-components */}
When you need to wait for an Ionic component to render before asserting against its DOM, use the `componentOnReady` helper exported from `@ionic/core`. Do not call `el.componentOnReady()` directly. `@ionic/react` uses Stencil's custom elements build, where that method does not exist on the element. The helper waits one animation frame instead, giving the component's inner contents a chance to render.
diff --git a/versioned_docs/version-v9/react/testing/unit-testing/examples.mdx b/versioned_docs/version-v9/react/testing/unit-testing/examples.mdx
index 39275eef669..1b5a84ac109 100644
--- a/versioned_docs/version-v9/react/testing/unit-testing/examples.mdx
+++ b/versioned_docs/version-v9/react/testing/unit-testing/examples.mdx
@@ -6,11 +6,11 @@ description: Learn how to test an Ionic React application. This document provide
# Examples
-## Testing a modal presented from a trigger
+## Testing a modal presented from a trigger {/* #testing-a-modal-presented-from-a-trigger */}
This example shows how to test a modal that is presented from a trigger. The modal is presented when the user clicks a button.
-### Example component
+### Example component {/* #example-component */}
```tsx title="src/Example.tsx"
import { IonButton, IonModal } from '@ionic/react';
@@ -25,7 +25,7 @@ export default function Example() {
}
```
-### Testing the modal
+### Testing the modal {/* #testing-the-modal */}
```tsx title="src/Example.test.tsx"
import { IonApp } from '@ionic/react';
@@ -49,11 +49,11 @@ test('button presents a modal when clicked', async () => {
});
```
-## Testing a modal presented from useIonModal
+## Testing a modal presented from useIonModal {/* #testing-a-modal-presented-from-useionmodal */}
This example shows how to test a modal that is presented using the `useIonModal` hook. The modal is presented when the user clicks a button.
-### Example component
+### Example component {/* #example-component-1 */}
```tsx title="src/Example.tsx"
import { IonContent, useIonModal, IonHeader, IonToolbar, IonTitle, IonButton, IonPage } from '@ionic/react';
@@ -87,7 +87,7 @@ const Example: React.FC = () => {
export default Example;
```
-### Testing the modal
+### Testing the modal {/* #testing-the-modal-1 */}
```tsx title="src/Example.test.tsx"
import { IonApp } from '@ionic/react';
diff --git a/versioned_docs/version-v9/react/testing/unit-testing/setup.mdx b/versioned_docs/version-v9/react/testing/unit-testing/setup.mdx
index 0e4cf3d1ed1..aae81f5703c 100644
--- a/versioned_docs/version-v9/react/testing/unit-testing/setup.mdx
+++ b/versioned_docs/version-v9/react/testing/unit-testing/setup.mdx
@@ -8,7 +8,7 @@ description: Learn how to set up unit tests for an Ionic React application.
Ionic requires a few additional steps to set up unit tests. If you are using an Ionic starter project, these steps have already been completed for you.
-### Install React Testing Library
+### Install React Testing Library {/* #install-react-testing-library */}
React Testing Library is a set of utilities that make it easier to test React components. It's used to interact with components and test their behavior.
@@ -16,7 +16,7 @@ React Testing Library is a set of utilities that make it easier to test React co
npm install --save-dev @testing-library/react @testing-library/jest-dom @testing-library/user-event
```
-### Initialize Ionic React
+### Initialize Ionic React {/* #initialize-ionic-react */}
Ionic React requires the `setupIonicReact` function to be called before any tests are run. Failing to do so will result in mode-based classes and platform behaviors not being applied to your components.
diff --git a/versioned_docs/version-v9/react/utility-functions.mdx b/versioned_docs/version-v9/react/utility-functions.mdx
index 905c470606d..15e70374138 100644
--- a/versioned_docs/version-v9/react/utility-functions.mdx
+++ b/versioned_docs/version-v9/react/utility-functions.mdx
@@ -13,17 +13,17 @@ sidebar_label: Utility Functions
Ionic React provides utility functions for common tasks like programmatic navigation and controlling page transitions.
-## Router
+## Router {/* #router */}
-### Functions
+### Functions {/* #functions */}
-#### useIonRouter
+#### useIonRouter {/* #useionrouter */}
▸ **useIonRouter**(): [`UseIonRouterResult`](#useionrouterresult)
Returns the Ionic router instance, which provides methods for programmatic navigation with control over page transitions. Use this hook instead of React Router's `useNavigate` when you need to customize the transition animation or use Ionic-aware back navigation.
-##### Customizing Page Transitions
+##### Customizing Page Transitions {/* #customizing-page-transitions */}
```tsx
import { useIonRouter } from '@ionic/react';
@@ -44,7 +44,7 @@ const MyComponent: React.FC = () => {
};
```
-##### Back Navigation
+##### Back Navigation {/* #back-navigation */}
The `goBack()` method navigates within the current Ionic navigation stack, unlike React Router's `navigate(-1)` which follows the browser's linear history.
@@ -64,7 +64,7 @@ const MyComponent: React.FC = () => {
};
```
-##### canGoBack
+##### canGoBack {/* #cangoback */}
Use `canGoBack()` to check whether there are additional routes in the Ionic router's history. This is useful when deciding whether to show a back button or handle the hardware back button on Android.
@@ -81,7 +81,7 @@ const MyComponent: React.FC = () => {
};
```
-##### navigateRoot
+##### navigateRoot {/* #navigateroot */}
Use `navigateRoot()` to navigate to a new root pathname, clearing the navigation history and unmounting all previous views. After navigation, `canGoBack()` will return `false`. This is useful for navigating to a new root after login or logout.
@@ -101,9 +101,9 @@ const MyComponent: React.FC = () => {
Review the [React Navigation Documentation](./navigation.mdx) for more navigation examples.
-### Interfaces
+### Interfaces {/* #interfaces */}
-#### UseIonRouterResult
+#### UseIonRouterResult {/* #useionrouterresult */}
```typescript
import { AnimationBuilder, RouterDirection, RouteAction, RouterOptions, RouteInfo } from '@ionic/react';
diff --git a/versioned_docs/version-v9/react/virtual-scroll.mdx b/versioned_docs/version-v9/react/virtual-scroll.mdx
index 355d58a06a6..c9816a72a68 100644
--- a/versioned_docs/version-v9/react/virtual-scroll.mdx
+++ b/versioned_docs/version-v9/react/virtual-scroll.mdx
@@ -8,7 +8,7 @@
One virtual scrolling solution to consider for your Ionic React app is [Virtuoso](https://virtuoso.dev/). This guide will go over how to install `Virtuoso` into your Ionic React application and use it with other Ionic components.
-## Installation
+## Installation {/* #installation */}
To setup the virtual scroller, first install `react-virtuoso`:
@@ -16,7 +16,7 @@ To setup the virtual scroller, first install `react-virtuoso`:
npm install react-virtuoso
```
-## Usage
+## Usage {/* #usage */}
There are a few components that Virtuoso includes, but this example will use the `Virtuoso` component. This component should be added inside of your `IonContent` component:
@@ -57,7 +57,7 @@ From there, we can use the `itemContent` property to pass a function that will b
An important thing to note here is the `div` that wraps our `IonItem` component. When lazy loading Ionic components, there may be a few frames where the component is loaded but the styles have not loaded in. When this happens, the component's dimension will be `0`, and Virtuoso may throw an error. This is because Virtuoso needs distinct positions for each item it renders, and it cannot determine that when a component's dimension is `0`.
-## Usage with Ionic Components
+## Usage with Ionic Components {/* #usage-with-ionic-components */}
Ionic Framework requires that features such as collapsible large titles, `ion-infinite-scroll`, `ion-refresher`, and `ion-reorder-group` be used within an `ion-content`. To use these experiences with virtual scrolling, you must add the `.ion-content-scroll-host` class to the virtual scroll viewport.
@@ -71,6 +71,6 @@ For example:
```
-## Further Reading
+## Further Reading {/* #further-reading */}
This guide only covers a small portion of what `Virtuoso` is capable of. For more details, please refer to the [Virtuoso documentation](https://virtuoso.dev/).
diff --git a/versioned_docs/version-v9/react/your-first-app.mdx b/versioned_docs/version-v9/react/your-first-app.mdx
index cd95427ae0e..fa052a476d2 100644
--- a/versioned_docs/version-v9/react/your-first-app.mdx
+++ b/versioned_docs/version-v9/react/your-first-app.mdx
@@ -24,7 +24,7 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-## What We'll Build
+## What We'll Build {/* #what-well-build */}
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
@@ -36,7 +36,7 @@ Highlights include:
Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-react) referenced in this guide on GitHub.
-## Download Required Tools
+## Download Required Tools {/* #download-required-tools */}
Download and install these right away to ensure an optimal Ionic development experience:
@@ -46,7 +46,7 @@ Download and install these right away to ensure an optimal Ionic development exp
- **Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode.
- **Mac/Linux** users: virtually any terminal will work.
-## Install Ionic Tooling
+## Install Ionic Tooling {/* #install-ionic-tooling */}
Run the following in the command line terminal to install the Ionic CLI (`ionic`), `native-run`, used to run native binaries on devices and simulators/emulators, and `cordova-res`, used to generate native app icons and splash screens:
@@ -68,7 +68,7 @@ Consider setting up npm to operate globally without elevated permissions. Refer
:::
-## Create an App
+## Create an App {/* #create-an-app */}
Next, create an Ionic React app that uses the "Tabs" starter template and adds Capacitor for native functionality:
@@ -90,7 +90,7 @@ Next we'll need to install the necessary Capacitor plugins to make the app's nat
npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem
```
-### PWA Elements
+### 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).
@@ -123,7 +123,7 @@ root.render(
That’s it! Now for the fun part - let’s run the app.
-## Run the App
+## Run the App {/* #run-the-app */}
Run this command next:
@@ -133,7 +133,7 @@ ionic serve
And voilà! Your Ionic app is now running in a web browser. Most of your app can be built and tested right in the browser, greatly increasing development and testing speed.
-## Photo Gallery
+## Photo Gallery {/* #photo-gallery */}
There are three tabs. Click on the "Tab2" tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
diff --git a/versioned_docs/version-v9/react/your-first-app/2-taking-photos.mdx b/versioned_docs/version-v9/react/your-first-app/2-taking-photos.mdx
index 198614407d2..b65238b780b 100644
--- a/versioned_docs/version-v9/react/your-first-app/2-taking-photos.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/2-taking-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Taking Photos
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 Gallery Hook
+## Photo Gallery Hook {/* #photo-gallery-hook */}
We will create a [custom React hook](https://react.dev/learn/reusing-logic-with-custom-hooks#extracting-your-own-custom-hook-from-a-component) to manage the photos for the gallery.
@@ -91,7 +91,7 @@ _(Your selfie is probably much better than mine)_
After taking a photo, it disappears right away. We need to display it within our app and save it for future access.
-## Displaying Photos
+## Displaying Photos {/* #displaying-photos */}
To define the data structure for our photo metadata, create a new interface named `UserPhoto`. Add this interface at the very bottom of the `usePhotoGallery.ts` file, immediately after the `usePhotoGallery()` method definition.
diff --git a/versioned_docs/version-v9/react/your-first-app/3-saving-photos.mdx b/versioned_docs/version-v9/react/your-first-app/3-saving-photos.mdx
index 258477749e0..0a880554877 100644
--- a/versioned_docs/version-v9/react/your-first-app/3-saving-photos.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/3-saving-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Saving Photos
We’re now able to take multiple photos and display them in a photo gallery on the second tab of our app. These photos, however, are not currently being stored permanently, so when the app is closed, they will be deleted.
-## Filesystem API
+## Filesystem API {/* #filesystem-api */}
Fortunately, saving them to the filesystem only takes a few steps. Begin by creating a new class method, `savePicture()`, in the `usePhotoGallery()` method in `usePhotoGallery.ts`.
diff --git a/versioned_docs/version-v9/react/your-first-app/4-loading-photos.mdx b/versioned_docs/version-v9/react/your-first-app/4-loading-photos.mdx
index 579bbe051ef..6bd1465a38d 100644
--- a/versioned_docs/version-v9/react/your-first-app/4-loading-photos.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/4-loading-photos.mdx
@@ -15,7 +15,7 @@ We’ve implemented photo taking and saving to the filesystem. There’s one las
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 {/* #preferences-api */}
Open `usePhotoGallery.ts` and begin by defining a constant variable that will act as the key for the store.
diff --git a/versioned_docs/version-v9/react/your-first-app/5-adding-mobile.mdx b/versioned_docs/version-v9/react/your-first-app/5-adding-mobile.mdx
index 302988e4e38..c0e285d68f6 100644
--- a/versioned_docs/version-v9/react/your-first-app/5-adding-mobile.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/5-adding-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Adding Mobile
Our photo gallery app won’t be complete until it runs on iOS, Android, and the web - all using one codebase. All it takes is some small logic changes to support mobile platforms, installing some native tooling, then running the app on a device. Let’s go!
-## Import Platform API
+## Import Platform API {/* #import-platform-api */}
Let’s start with making some small code changes - then our app will “just work” when we deploy it to a device.
@@ -33,7 +33,7 @@ import { Capacitor } from '@capacitor/core';
// ...existing code...
```
-## Platform-specific Logic
+## Platform-specific Logic {/* #platform-specific-logic */}
First, we’ll update the photo saving functionality to support mobile. In the `savePicture()` method, check which platform the app is running on. If it’s “hybrid” (Capacitor, the native runtime), then read the photo file into base64 format using the `Filesystem.readFile()` method. Otherwise, use the same logic as before when running the app on the web.
diff --git a/versioned_docs/version-v9/react/your-first-app/6-deploying-mobile.mdx b/versioned_docs/version-v9/react/your-first-app/6-deploying-mobile.mdx
index 64b4888315f..ba2d1181c0b 100644
--- a/versioned_docs/version-v9/react/your-first-app/6-deploying-mobile.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/6-deploying-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Deploying Mobile
Since we added Capacitor to our project when it was first created, there’s only a handful of steps remaining until the Photo Gallery app is on our device!
-## Capacitor Setup
+## Capacitor Setup {/* #capacitor-setup */}
Capacitor is Ionic’s official app runtime that makes it easy to deploy web apps to native platforms like iOS, Android, and more. If you’ve used Cordova in the past, consider reading more about the [differences between Capacitor and Cordova](https://capacitorjs.com/docs/cordova#differences-between-capacitor-and-cordova).
@@ -44,7 +44,7 @@ Note: After making updates to the native portion of the code (such as adding a n
ionic cap sync
```
-## iOS Deployment
+## iOS Deployment {/* #ios-deployment */}
:::important
@@ -82,7 +82,7 @@ Upon tapping the Camera button on the Photo Gallery tab, the permission prompt w

-## Android Deployment
+## Android Deployment {/* #android-deployment */}
Capacitor Android apps are configured and managed through Android Studio. Before running this app on an Android device, there's a couple of steps to complete.
diff --git a/versioned_docs/version-v9/react/your-first-app/7-live-reload.mdx b/versioned_docs/version-v9/react/your-first-app/7-live-reload.mdx
index 25665f016d4..f93cf02adb3 100644
--- a/versioned_docs/version-v9/react/your-first-app/7-live-reload.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/7-live-reload.mdx
@@ -15,7 +15,7 @@ So far, we’ve learned how easy it is to develop a cross-platform app that work
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
+## Live Reload {/* #live-reload */}
Remember `ionic serve`? That was Live Reload working in the browser, allowing us to iterate quickly.
@@ -31,7 +31,7 @@ ionic cap run android -l --external
The Live Reload server will start up, and the native IDE of choice will open if not opened already. Within the IDE, click the Play button to launch the app onto your device.
-## Deleting Photos
+## Deleting Photos {/* #deleting-photos */}
With Live Reload running and the app open on your device, let’s implement photo deletion functionality.
diff --git a/versioned_docs/version-v9/react/your-first-app/8-distribute.mdx b/versioned_docs/version-v9/react/your-first-app/8-distribute.mdx
index e1c6a8ac23d..157c9764b50 100644
--- a/versioned_docs/version-v9/react/your-first-app/8-distribute.mdx
+++ b/versioned_docs/version-v9/react/your-first-app/8-distribute.mdx
@@ -15,13 +15,13 @@ Now that you have built your first app, you are going to want to get it distribu
Below we will run through an overview of the steps.
-## Connect Your Repo
+## Connect Your Repo {/* #connect-your-repo */}
Appflow works directly with Git version control and uses your existing code base as the source of truth for Deploy and Package builds. You will first need to integrate with your hosting service, such as GitHub or Bitbucket, or you can push your code directly to Appflow. Once this is completed, Appflow will have access to your code.
For more on connecting your code repository to Appflow, checkout the [Connect your Repo](https://ionic.io/docs/appflow/quickstart/connect) section inside the Appflow docs.
-## Install the Appflow SDK
+## Install the Appflow SDK {/* #install-the-appflow-sdk */}
The Appflow SDK (also known as Ionic Deploy plugin) will allow you to take advantage of arguably two of the best Appflow features: deploying live updates to your app and bypassing the app stores. Ionic Appflow's Live Update feature is shipped with Appflow SDK and features the capabilities of detecting and syncing the updates for your app that you have pushed to your identified channels within the dashboard.
@@ -36,7 +36,7 @@ ionic deploy add \
For prerequisite and additional instructions on installing the Appflow SDK, visit the [Install the Appflow SDK](https://ionic.io/docs/appflow/quickstart/installation) section inside the Appflow docs.
-## Push a Commit
+## Push a Commit {/* #push-a-commit */}
In order for Appflow to access the latest and greatest changes to your code, you will need to push a commit via the version control integration of your choosing. For those that use GitHub or Bitbucket, this would look as follows:
@@ -48,7 +48,7 @@ git push origin main # push the changes from the main branch to your git host
After the push is made, your commit appears under the `Commits` tab of the Appflow Dashboard. For more information, refer to the [Push a Commit](https://ionic.io/docs/appflow/quickstart/push) section inside the Appflow docs.
-## Deploy a Live Update
+## Deploy a Live Update {/* #deploy-a-live-update */}
With the Appflow SDK installed and your commit pushed up to the Dashboard, you are ready to deploy a live update to a device. The Live Update feature uses the installed Appflow SDK with your native application to listen to a particular Deploy Channel Destination. When a live update is assigned to a Channel Destination, that update will be deployed to user devices running binaries that are configured to listen to that specific Channel Destination.
@@ -66,7 +66,7 @@ Assuming the app is configured correctly to listen to the channel you deployed t
To dive into more details on the steps to deploy a live update, as well as additional information such as disabling deploy for development, check out the [Deploy a Live Update](https://ionic.io/docs/appflow/quickstart/deploy) section inside the Appflow docs.
-## Build a Native Binary
+## Build a Native Binary {/* #build-a-native-binary */}
Next up is a native binary for your app build and deploy process. This is done via the [Ionic Package](https://ionic.io/docs/appflow/package/intro) service. First things first, you will need to create a [Package build](https://ionic.io/docs/appflow/package/builds). This can be done by clicking the `Start build` icon from the `Commits` tab or by clicking the `New build` button in the top right from the `Build > Builds` tab. Then you will select the proper commit for your build and fill in all of the several required fields and any optional fields that you want to specify. After filling in all of the information and the build begins, you can check out it's progress and review the logs if you encounter any errors.
@@ -74,19 +74,19 @@ Given a successful Package build, an iOS binary (`.ipa` or IPA) or/and an Androi
Further information regarding building native binaries can be found inside of the [Build a Native Binary](https://ionic.io/docs/appflow/quickstart/package) section inside the Appflow docs.
-## Create an Automation
+## Create an Automation {/* #create-an-automation */}
[Automations](https://ionic.io/docs/appflow/automation/intro) enable you and your team to utilize the full CI/CD powers of Appflow. You can create automations that trigger [Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) every time your team commits new code to a given branch. The automations can also be configured to use different environments and native configurations for building different versions of your app for development, staging, QA and production.
For more information, visit the [Create an Automation](https://ionic.io/docs/appflow/quickstart/automation) section within the Appflow docs. That section covers creating a single automation. However, you can create multiple automations for different branches or workflows and customize them to fit your needs. An important note is that the ability to create an automation is available for those on our [Basic plans](https://ionic.io/pricing) and above.
-## Create an Environment
+## Create an Environment {/* #create-an-environment */}
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be further customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
Creating an Environment is available for those on our [Basic plans](https://ionic.io/pricing) and above. More information on this can be found in the [Create an Environment](https://ionic.io/docs/appflow/quickstart/environment) section within the Appflow docs.
-## Create a Native Configuration
+## Create a Native Configuration {/* #create-a-native-configuration */}
[Native Configurations](https://ionic.io/docs/appflow/package/native-configs) allow you to easily modify common configuration values that can change between different environments (development, production, staging, etc.) so you do not need to use extra logic or manually commit them to version control. Native configurations can be attached to any [Package build](https://ionic.io/docs/appflow/package/intro) or [Automation](https://ionic.io/docs/appflow/automation/intro).
@@ -98,7 +98,7 @@ Native configs can be used to:
For access to the ability to create a Native Configuration, you will need to be on our [Basic plans](https://ionic.io/pricing) and above. Additional details of this feature can be found in the [Create a Native Configuration](https://ionic.io/docs/appflow/quickstart/native-config) section within the Appflow docs.
-## What’s Next?
+## What’s Next? {/* #whats-next */}
Congratulations! You developed a complete cross-platform Photo Gallery app that runs on the web, iOS, and Android. Not only that, you have also then built the app and deployed it to your users' devices!
diff --git a/versioned_docs/version-v9/reference/browser-support.mdx b/versioned_docs/version-v9/reference/browser-support.mdx
index 0776df2a8f6..5f0c5d38db2 100644
--- a/versioned_docs/version-v9/reference/browser-support.mdx
+++ b/versioned_docs/version-v9/reference/browser-support.mdx
@@ -12,7 +12,7 @@ title: Browser Support
Ionic's earliest goal was to make it easy to develop mobile apps using web technologies like HTML, CSS, and JavaScript. Because of this foundation in web technologies, Ionic can run anywhere the web runs — iOS, Android, browsers, PWAs, and more.
-## Mobile Platforms
+## Mobile Platforms {/* #mobile-platforms */}
In pursuit of [adaptive styling](../core-concepts/fundamentals.mdx#adaptive-styling), Ionic fully supports and is well tested on the mobile platforms listed below:
@@ -31,13 +31,13 @@ Check the [latest Android stats](https://developer.android.com/about/dashboards/
:::
-### A Note on Android Support
+### A Note on Android Support {/* #a-note-on-android-support */}
Starting with Android 5.0, the webview was moved to a separate application that can be updated independently of Android. This means that most Android 5.0+ devices are going to be running a modern version of Chromium. However, there are a still a subset of Android devices that are unable to have their webview updated. These webviews are typically stuck at the version that was available when the device initially shipped.
To figure out what version of the webview a device is running, log `window.navigator.userAgent` to the console when inspecting the application using Chrome Dev Tools.
-## Browsers
+## Browsers {/* #browsers */}
Ionic supports the following browsers:
diff --git a/versioned_docs/version-v9/reference/support.mdx b/versioned_docs/version-v9/reference/support.mdx
index 409485fb547..405c5ebe07d 100644
--- a/versioned_docs/version-v9/reference/support.mdx
+++ b/versioned_docs/version-v9/reference/support.mdx
@@ -10,11 +10,11 @@ title: Support Policy
/>
-## Community Maintenance
+## Community Maintenance {/* #community-maintenance */}
The Ionic Framework has been 100% open source (MIT) since the very beginning, and always will be. Developers can ensure Ionic is the right choice for their cross-platform apps through Ionic’s community maintenance strategy. The Ionic team regularly ships new releases, bug fixes, and is very welcoming to community pull requests.
-## Framework Maintenance and Support Status
+## Framework Maintenance and Support Status {/* #framework-maintenance-and-support-status */}
Given the reality of time and resource constraints as well as the desire to keep innovating in the frontend development space, over time it becomes necessary for the Ionic team to shift focus to newer versions of the Framework. However, Ionic will do everything it can to make the transition to newer versions as smooth as possible. The Ionic team recommends updating to the newest version of the Ionic Framework for the latest features, improvements and stability updates.
@@ -35,13 +35,13 @@ The current status of each Ionic Framework version is:
- **Maintenance**: Only critical bug and security fixes. No major feature improvements.
- **Extended Support**: For teams and organizations that require additional long term maintenance support, Ionic has extended support options available.
-## Compatibility Recommendations
+## Compatibility Recommendations {/* #compatibility-recommendations */}
The Ionic team has compiled a set of recommendations for using the Ionic Framework in conjunction with other contextually-relevant software. This is not meant to be a comprehensive list, but covers many common compatibility questions. The Ionic team strongly recommends reviewing your project dependencies once each quarter to keep track of new releases, features and bug fixes.
-### Core Dependencies
+### Core Dependencies {/* #core-dependencies */}
-#### Ionic Angular
+#### Ionic Angular {/* #ionic-angular */}
| Framework | Minimum Angular Version | Maximum Angular Version | TypeScript |
| :-------: | :---------------------: | :---------------------: | :--------: |
@@ -67,7 +67,7 @@ Angular's support policy for iOS is the two most recent major versions. This mea
Note that later versions of Ionic do not support iOS 13; refer to the [mobile support table](./browser-support.mdx#mobile-platforms).
-#### Ionic React
+#### Ionic React {/* #ionic-react */}
| Framework | Required React Version | TypeScript |
| :-------: | :--------------------: | :--------: |
@@ -78,7 +78,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
| v5 | v16.8+ | 3.7+ |
| v4 | v16.8+ | 3.7+ |
-#### Ionic Vue
+#### Ionic Vue {/* #ionic-vue */}
| Framework | Required Vue Version | TypeScript |
| :-------: | :------------------: | :--------: |
@@ -88,7 +88,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
| v6 | v3.0.6+ | 3.9+ |
| v5 | v3.0+ | 3.9+ |
-#### Ionic Vue Router
+#### Ionic Vue Router {/* #ionic-vue-router */}
| Framework | Required Vue Router Version |
| :-------: | :-------------------------: |
@@ -98,7 +98,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
| v6 | v4+ |
| v5 | v4+ |
-### Native Bridges
+### Native Bridges {/* #native-bridges */}
| Framework | Cordova | Capacitor |
| :------------: | :----------------------------------: | :----------------------: |
@@ -115,7 +115,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
- As iOS and Android (and related tools) are updated, you can expect more updates for Cordova and Capacitor, so it is recommended to stay on the latest version(s) of Cordova and Capacitor.
- Starting with Ionic v9, Capacitor 7 is the minimum officially supported version. Earlier versions of Ionic ran on Capacitor 2 and later.
-### Ionic Platform & Products
+### Ionic Platform & Products {/* #ionic-platform--products */}
| Framework | Appflow | Ionic Native Premier Plugins\* |
| :----------: | :-------------------: | :-----------------------------------------------: |
@@ -129,7 +129,7 @@ Note that later versions of Ionic do not support iOS 13; refer to the [mobile su
- For Capacitor projects, follow the [Capacitor installation guide for Cordova plugins](https://capacitorjs.com/docs/cordova/using-cordova-plugins)
- If you need to use an Enterprise plugin with an Ionic 3 project, please [contact us](https://ionic.zendesk.com/hc)
-### Ionic Platform & Products (Cont.)
+### Ionic Platform & Products (Cont.) {/* #ionic-platform--products-cont */}
| Framework | Ionic Studio | Ionic Native Community Plugins\* |
| :----------: | :---------------------: | :------------------------------: |
diff --git a/versioned_docs/version-v9/reference/versioning.mdx b/versioned_docs/version-v9/reference/versioning.mdx
index 51ee30f7257..0dc26316096 100644
--- a/versioned_docs/version-v9/reference/versioning.mdx
+++ b/versioned_docs/version-v9/reference/versioning.mdx
@@ -2,21 +2,21 @@
Ionic Framework follows the [Semantic Versioning (SemVer)](https://semver.org/) convention: major.minor.patch. Incompatible API changes increment the major version, adding backwards-compatible functionality increments the minor version, and backwards-compatible bug fixes increment the patch version.
-## Release Schedule
+## Release Schedule {/* #release-schedule */}
-### Major Release
+### Major Release {/* #major-release */}
A major release will be published when there is a breaking change introduced in the API. Major releases will occur roughly every **6 months** and may contain breaking changes. Several release candidates will be published prior to a major release in order to get feedback before the final release. An outline of what is changing and why will be included with the release candidates.
-### Minor Release
+### Minor Release {/* #minor-release */}
A minor release will be published when a new feature is added or API changes that are non-breaking are introduced. We will heavily test any changes so that we are confident with the release, but with new code comes the potential for new issues. We are scheduled to release a minor version **every 4 weeks**, if any features or API changes were made.
-### Patch Release
+### Patch Release {/* #patch-release */}
A patch release will be published when bug fixes were included, but the API has not changed and no breaking changes were introduced. We are scheduled to release a new patch version **every week**, but there may be times where we need to release sooner or later than scheduled. To ensure patch releases can fix existing code without introducing new issues from the new features, patch releases will always be published prior to a minor release.
-## Changelog
+## Changelog {/* #changelog */}
For a list of all notable changes to Ionic please refer to the [changelog](https://github.com/ionic-team/ionic/blob/master/CHANGELOG.md). This contains an ordered
list of all bug fixes and new features under each release.
diff --git a/versioned_docs/version-v9/techniques/security.mdx b/versioned_docs/version-v9/techniques/security.mdx
index 9aebc97ca93..b7d5c801bfb 100644
--- a/versioned_docs/version-v9/techniques/security.mdx
+++ b/versioned_docs/version-v9/techniques/security.mdx
@@ -13,7 +13,7 @@ title: Security
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-## Sanitizing User Input
+## Sanitizing User Input {/* #sanitizing-user-input */}
For components such as `ion-alert` developers can allow for custom or user-provided content. This content can be plain text or HTML and should be considered untrusted. As with any untrusted input, it is important to sanitize it before doing anything else with it. In particular, using things like `innerHTML` without sanitization provides an attack vector for bad actors to input malicious content and potentially launch a [Cross Site Scripting attack (XSS)](https://en.wikipedia.org/wiki/Cross-site_scripting).
@@ -21,7 +21,7 @@ Ionic comes built in with a basic sanitization implementation for the components
For developers who are not using a framework, or for developers whose framework does not provide the sanitization methods they need, we recommend using [sanitize-html](https://www.npmjs.com/package/sanitize-html). This package provides a simple HTML sanitizer that allows the developer to specify the exact tags and attributes that they want to allow in their application.
-### Angular
+### Angular {/* #angular */}
Angular comes built in with the `DomSanitizer` class. This helps prevent XSS issues by ensuring that values are safe to be used in the DOM. By default, Angular will mark any values it deems unsafe. For example, the following link would be marked as unsafe by Angular because it would attempt to execute some JavaScript.
@@ -35,7 +35,7 @@ public myUrl: string = 'javascript:alert("oh no!")';
To learn more about the built-in protections that Angular provides, refer to the [Angular Security Guide](https://angular.io/guide/security).
-### React
+### React {/* #react */}
React DOM escapes values embedded in JSX before rendering them by converting them to strings. For example, the following would be safe as `name` is converted to a string before being rendered:
@@ -53,17 +53,17 @@ const element = Click Me!;
If the developer needs to achieve more comprehensive sanitization, they can use the [sanitize-html](https://www.npmjs.com/package/sanitize-html) package.
-### Vue
+### Vue {/* #vue */}
Vue does not provide any type of sanitizing methods built in. It is recommended that developers use a package such as [sanitize-html](https://www.npmjs.com/package/sanitize-html).
To learn more about the security recommendations for binding to directives such as `v-html`, refer to the [Vue Syntax Guide](https://vuejs.org/v2/guide/syntax.html#Raw-HTML).
-## Enabling Custom HTML Parsing via `innerHTML`
+## Enabling Custom HTML Parsing via `innerHTML` {/* #enabling-custom-html-parsing-via-innerhtml */}
`ion-alert`, `ion-infinite-scroll-content`, `ion-loading`, `ion-refresher-content`, `ion-select-option`, and `ion-toast` can accept custom HTML as strings for certain properties. These strings are added to the DOM using `innerHTML` and must be properly sanitized by the developer. This behavior is disabled by default which means values passed to the affected components will always be interpreted as plaintext. Developers can enable this custom HTML behavior by setting `innerHTMLTemplatesEnabled: true` in the [IonicConfig](../developing/config.mdx#ionicconfig).
-## Ejecting from the built-in sanitizer
+## Ejecting from the built-in sanitizer {/* #ejecting-from-the-built-in-sanitizer */}
For developers who wish to add complex HTML to components such as `ion-toast`, they will need to eject from the sanitizer that is built into Ionic Framework. Developers can either disable the sanitizer across their entire app or bypass it on a case-by-case basis.
@@ -73,11 +73,11 @@ Bypassing sanitization functionality can make your application vulnerable to [XS
:::
-### Disabling the sanitizer via config
+### Disabling the sanitizer via config {/* #disabling-the-sanitizer-via-config */}
Ionic Framework provides an application config option called `sanitizerEnabled` that is set to `true` by default. Set this value to `false` to globally disable Ionic Framework's built in sanitizer. Please note that this does not disable any sanitizing functionality provided by other frameworks such as Angular.
-### Bypassing the sanitizer on a case-by-case basis
+### Bypassing the sanitizer on a case-by-case basis {/* #bypassing-the-sanitizer-on-a-case-by-case-basis */}
Developers can also choose to eject from the sanitizer in certain scenarios. Ionic Framework provides the `IonicSafeString` class that allows developers to do just that.
@@ -91,7 +91,7 @@ Refer to [Enabling Custom HTML Parsing](#enabling-custom-html-parsing-via-innerh
:::
-#### Usage
+#### Usage {/* #usage */}
````mdx-code-block
{
````
-## Content Security Policies (CSP)
+## Content Security Policies (CSP) {/* #content-security-policies-csp */}
A [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) is a security mechanism that helps protect web applications against certain types of attacks, such as cross-site scripting (XSS) and data injection. It is implemented through an HTTP header that instructs the browser on which sources of content, such as scripts, stylesheets, and images, are allowed to be loaded and executed on a web page.
The main purpose of a CSP is to mitigate the risks associated with code injection attacks. By defining a policy, web developers can specify from which domains or sources the browser should allow the loading and execution of various types of content. This effectively limits the potential damage that can be caused by malicious scripts or unauthorized content.
-### Enabling CSPs
+### Enabling CSPs {/* #enabling-csps */}
Developers can assign a CSP to their application by setting a meta tag with the policy details and the expected nonce value on script and style tags.
@@ -203,7 +203,7 @@ Developers can assign a CSP to their application by setting a meta tag with the
/>
```
-### Ionic and CSP
+### Ionic and CSP {/* #ionic-and-csp */}
Ionic Framework provides a function to help developers set the nonce value used when constructing the web component stylesheets. This function should be called before any Ionic components are loaded. This is required to pass the nonce value to the web components so that they can be used in a CSP environment.
@@ -221,7 +221,7 @@ In Angular this can be called in the `main.ts` file, before the application is b
For more information on how to use CSPs with Stencil web components, refer to the [Stencil documentation](https://stenciljs.com/docs/csp-nonce).
-### Angular
+### Angular {/* #angular-1 */}
Starting in Angular 16, Angular provides two options for setting the nonce value.
diff --git a/versioned_docs/version-v9/test/page1.mdx b/versioned_docs/version-v9/test/page1.mdx
deleted file mode 100644
index cd5b72410d0..00000000000
--- a/versioned_docs/version-v9/test/page1.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 1
-
-This is Testing page 1, Get to Testing Page 2 [here](page2.mdx).
diff --git a/versioned_docs/version-v9/test/page2.mdx b/versioned_docs/version-v9/test/page2.mdx
deleted file mode 100644
index 5ebdef8dca0..00000000000
--- a/versioned_docs/version-v9/test/page2.mdx
+++ /dev/null
@@ -1,3 +0,0 @@
-# Testing Page 2
-
-This is Testing page 2, Get to Testing Page 1 [here](page1.mdx).
diff --git a/versioned_docs/version-v9/theming/advanced.mdx b/versioned_docs/version-v9/theming/advanced.mdx
index 935a77e05b8..26570ed441b 100644
--- a/versioned_docs/version-v9/theming/advanced.mdx
+++ b/versioned_docs/version-v9/theming/advanced.mdx
@@ -15,7 +15,7 @@ import CodeColor from '@components/page/theming/CodeColor';
CSS-based theming enables apps to customize the colors quickly by loading a CSS file or changing a few CSS property values.
-## `theme-color` Meta
+## `theme-color` Meta {/* #theme-color-meta */}
The `theme-color` value for a meta tag indicates a color that browsers can use to customize the display of a page or of the surrounding interface. This kind of meta tag can also accept media queries which allow developers to set the theme color for both light and dark modes.
@@ -52,11 +52,11 @@ Browsers will prefer the `theme-color` meta over `theme` in `manifest.json` if b
For more information, refer to the [MDN theme-color documentation](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta/name/theme-color).
-## Global Variables
+## Global Variables {/* #global-variables */}
While the application and stepped variables in the themes section are useful for changing the colors of an application, often times there is a need for variables that are used in multiple components. The following variables are shared across components to change global padding settings and more.
-### Application Variables
+### Application Variables {/* #application-variables */}
| Name | Description |
| --------------------------- | ---------------------------------------------------------------------------------------------------- |
@@ -70,7 +70,7 @@ While the application and stepped variables in the themes section are useful for
| `--ion-padding` | Adjust the padding of the [Padding attributes](../layout/css-utilities.mdx#padding) |
| `--ion-placeholder-opacity` | Adjust the opacity of the placeholders used in the input, textarea, searchbar, and select components |
-### Grid Variables
+### Grid Variables {/* #grid-variables */}
| Name | Description |
| ------------------------------ | ---------------------------------------------- |
@@ -86,9 +86,9 @@ While the application and stepped variables in the themes section are useful for
| `--ion-grid-column-padding-lg` | Padding of the grid columns for lg breakpoints |
| `--ion-grid-column-padding-xl` | Padding of the grid columns for xl breakpoints |
-## Known Limitations with Variables
+## Known Limitations with Variables {/* #known-limitations-with-variables */}
-### The Alpha Problem
+### The Alpha Problem {/* #the-alpha-problem */}
There is not yet full [browser support](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Browser_compatibility) for alpha use of a hex color. The [`rgba()`]() function only accepts a value in `R, G, B, A` (Red, Green, Blue, Alpha) format. The following code shows examples of correct and incorrect values passed to `rgba()`.
@@ -137,7 +137,7 @@ body {
}
```
-### Variables in Media Queries
+### Variables in Media Queries {/* #variables-in-media-queries */}
CSS variables in [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries) are not currently supported, but there are open drafts to add [custom media queries](https://drafts.csswg.org/mediaqueries-5/#custom-mq) and [custom environment variables](https://drafts.csswg.org/css-env-1/) that would solve this problem! However, with the current state of support, the following will **not** work:
@@ -151,7 +151,7 @@ CSS variables in [media queries](https://developer.mozilla.org/en-US/docs/Web/CS
}
```
-### Modifying CSS Color Variables
+### Modifying CSS Color Variables {/* #modifying-css-color-variables */}
While it is possible to easily alter a color in Sass using its built-in functions, it is currently not as easy to modify colors set in CSS Variables. This can be accomplished in CSS by splitting the [RGB](https://developer.mozilla.org/en-US/docs/Glossary/RGB) or [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) channels and modifying each value, but it is complex and has missing functionality.
@@ -186,7 +186,7 @@ This is normally not a problem, but when an application needs to have dynamic th
There are drafts and issues discussing [color modification proposals](https://github.com/w3c/csswg-drafts/issues/3187) that would make this possible.
-## Safe Area Padding
+## Safe Area Padding {/* #safe-area-padding */}
The safe area of a display is the section that is not covered by the device's notch, status bar, or other elements that are part of the device's UI and not the app's. The dimensions of the safe area are different across devices and orientations (portrait or landscape).
diff --git a/versioned_docs/version-v9/theming/basics.mdx b/versioned_docs/version-v9/theming/basics.mdx
index b330a7383ea..9d7b01ffad2 100644
--- a/versioned_docs/version-v9/theming/basics.mdx
+++ b/versioned_docs/version-v9/theming/basics.mdx
@@ -15,7 +15,7 @@ import ColorAccordion from '@components/page/theming/ColorAccordion';
Ionic Framework is built to be a blank slate that can easily be customized and modified to fit a brand, while still following the standards of the different platforms. Theming Ionic apps is now easier than ever. Because the framework is built with CSS, it comes with pre-baked default styles which are extremely easy to change and modify.
-## Colors
+## Colors {/* #colors */}
Ionic has nine default colors that can be used to change the color of many components. Each color is actually a collection of multiple properties, including a `shade` and `tint`, used throughout Ionic.
@@ -23,20 +23,20 @@ When changing a color, it is important to set all of the related properties. Thi
-## Platform Standards
+## Platform Standards {/* #platform-standards */}
Ionic components adapt their look and behavior based on the platform the app is running on. We call this **Adaptive Styling**. This allows developers to build apps that use the same codebase for multiple platforms, while still looking "native" to those particular platforms.
Ionic has two **modes** that are used to customize the look of components based on the **platform**: `ios` and `md`. Each platform has a default mode, but this can easily be configured. For more information on customizing an application based on the platform, refer to [Platform Styles](platform-styles.mdx).
-## CSS Variables
+## CSS Variables {/* #css-variables */}
The Ionic Framework components are themed using [CSS custom properties (variables)](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables). CSS variables add dynamic values to an otherwise static language. This is something that has traditionally required a CSS preprocessor like Sass. The look of an application can easily be changed by changing the value of any of the [CSS Variables](css-variables.mdx) Ionic Framework provides.
-## CSS Shadow Parts
+## CSS Shadow Parts {/* #css-shadow-parts */}
CSS Shadow Parts were added to make it easier to fully customize Ionic Framework Shadow components. In the past, components that use [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) were unable to have elements inside of their shadow tree styled directly. With the addition of Shadow parts, there is no longer a need for CSS variables for every property on an inner element of a Shadow component. For more information on customizing Ionic Framework components using parts, refer to the [CSS Shadow Parts](css-shadow-parts.mdx) guide.
-## Branding
+## Branding {/* #branding */}
Ionic provides application colors that can be used to theme an application to match a brand or color scheme. The default theme uses a light background, but everything from the background color to the text color is fully customizable. For more information on branding, refer to [Themes](themes.mdx).
diff --git a/versioned_docs/version-v9/theming/colors.mdx b/versioned_docs/version-v9/theming/colors.mdx
index b05f9d1c2a3..3c439cddb04 100644
--- a/versioned_docs/version-v9/theming/colors.mdx
+++ b/versioned_docs/version-v9/theming/colors.mdx
@@ -31,13 +31,13 @@ A color can be applied to an Ionic component in order to change the default colo
Dark
```
-## Layered Colors
+## Layered Colors {/* #layered-colors */}
Each color consists of the following properties: a `base`, `contrast`, `shade`, and `tint`. The `base` and `contrast` colors also require a `rgb` property which is the same color, just in [rgb format](https://developer.mozilla.org/en-US/docs/Glossary/RGB). Refer to [The Alpha Problem](advanced.mdx#the-alpha-problem) for an explanation of why the `rgb` property is also needed. Select from the dropdown below to explore each of the default colors Ionic provides and their variations.
-## Modifying Colors
+## Modifying Colors {/* #modifying-colors */}
To change the default values of a color, all of the listed variations for that color should be set. For example, to change the secondary color to #006600, set the following CSS properties:
@@ -62,7 +62,7 @@ Not sure how to get the variation colors from the base color? Try out our [Color
Refer to the [CSS Variables documentation](css-variables.mdx) for more information on CSS variables.
-## Adding Colors
+## Adding Colors {/* #adding-colors */}
Colors can be added for use throughout an application by setting the `color` property on an Ionic component, or by styling with CSS. Read on to learn how to manually add a new color, or use the [New Color Creator](#new-color-creator) below for a quick way to generate the code of a new color to be copy and pasted into an application.
@@ -109,7 +109,7 @@ div {
Refer to the [CSS Variables documentation](css-variables.mdx) for more information on setting and using CSS variables.
-## New Color Creator
+## New Color Creator {/* #new-color-creator */}
Create a new color below by changing the name and value, then copy and paste the code below into your project.
diff --git a/versioned_docs/version-v9/theming/css-shadow-parts.mdx b/versioned_docs/version-v9/theming/css-shadow-parts.mdx
index fb8fc4f959e..c9270ba18e8 100644
--- a/versioned_docs/version-v9/theming/css-shadow-parts.mdx
+++ b/versioned_docs/version-v9/theming/css-shadow-parts.mdx
@@ -12,7 +12,7 @@ title: CSS Shadow Parts
CSS Shadow Parts allow developers to style CSS properties on an element inside of a shadow tree. This is extremely useful in customizing Ionic Framework [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) components.
-## Why Shadow Parts?
+## Why Shadow Parts? {/* #why-shadow-parts */}
Ionic Framework is a distributed set of [Web Components](https://developer.mozilla.org/en-US/docs/Web/Web_Components). Web Components follow the [Shadow DOM specification](https://w3c.github.io/webcomponents/spec/shadow/) in order to encapsulate styles and markup.
@@ -45,11 +45,11 @@ ion-select .select-placeholder {
So how do we solve this? [CSS Shadow Parts](#shadow-parts-explained)!
-## Shadow Parts Explained
+## Shadow Parts Explained {/* #shadow-parts-explained */}
Shadow parts allow developers to style inside a shadow tree, from outside of that shadow tree. In order to do so, the [part must be exposed](#exposing-a-part) and then it can be styled by using [::part](#how-part-works).
-### Exposing a part
+### Exposing a part {/* #exposing-a-part */}
When creating a Shadow DOM component, a part can be added to an element inside of a shadow tree by assigning a `part` attribute on the element. This is added to the component in Ionic Framework and requires no action from an end user.
@@ -67,7 +67,7 @@ The above shows two parts: `placeholder` and `icon`. Refer to the [select docume
With these parts exposed, the element can now be styled directly using [::part](#how-part-works).
-### How ::part works
+### How ::part works {/* #how-part-works */}
The [`::part()`](https://developer.mozilla.org/en-US/docs/Web/CSS/::part) pseudo-element allows developers to select elements inside of a shadow tree that have been exposed via a part attribute.
@@ -105,7 +105,7 @@ There are some known limitations with [vendor prefixed pseudo-elements](#vendor-
:::
-## Ionic Framework Parts
+## Ionic Framework Parts {/* #ionic-framework-parts */}
All exposed parts for an Ionic Framework component can be found under the CSS Shadow Parts heading on its API page. To view all components and their API pages, refer to the [Component documentation](../components.mdx).
@@ -121,13 +121,13 @@ We welcome recommendations for additional parts. Please create a [new GitHub iss
:::
-## Known Limitations
+## Known Limitations {/* #known-limitations */}
-### Browser Support
+### Browser Support {/* #browser-support */}
CSS Shadow Parts are supported in the recent versions of all of the major browsers. However, some of the older versions do not support shadow parts. Verify the [browser support](https://caniuse.com/#feat=mdn-css_selectors_part) meets the requirements before implementing parts in an app. If browser support for older versions is required, we recommend continuing to use [CSS Variables](../theming/css-variables.mdx) for styling.
-### Vendor Prefixed Pseudo-Elements
+### Vendor Prefixed Pseudo-Elements {/* #vendor-prefixed-pseudo-elements */}
Pseudo-elements that are [vendor prefixed](https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix) are not supported at this time. An example of this would be any of the `::-webkit-scrollbar` pseudo-elements:
@@ -140,7 +140,7 @@ my-component::part(scroll)::-webkit-scrollbar {
Refer to [this issue on GitHub](https://github.com/w3c/csswg-drafts/issues/4530) for more information.
-### Structural Pseudo-Classes
+### Structural Pseudo-Classes {/* #structural-pseudo-classes */}
Most pseudo-classes are supported with parts, however, [structural pseudo-classes](https://www.w3.org/TR/selectors-4/#structural-pseudos) are not. An example of structural pseudo-classes that do not work is below.
@@ -156,7 +156,7 @@ my-component::part(container):last-child {
}
```
-### Chaining Parts
+### Chaining Parts {/* #chaining-parts */}
The `::part()` pseudo-element can not match additional `::part()`s.
diff --git a/versioned_docs/version-v9/theming/css-variables.mdx b/versioned_docs/version-v9/theming/css-variables.mdx
index 5de7885d851..96ee7e53828 100644
--- a/versioned_docs/version-v9/theming/css-variables.mdx
+++ b/versioned_docs/version-v9/theming/css-variables.mdx
@@ -12,9 +12,9 @@ title: CSS Variables
Ionic components are built with [CSS Variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables) for easy customization of an application. CSS variables allow a value to be stored in one place, then referenced in multiple other places. They also make it possible to change CSS dynamically at runtime (which previously required a CSS preprocessor). CSS variables make it easier than ever to override Ionic components to match a brand or theme.
-## Setting Values
+## Setting Values {/* #setting-values */}
-### Global Variables
+### Global Variables {/* #global-variables */}
CSS variables can be set globally in an application in the `:root` selector. They can also be applied only for a specific mode. Refer to [Ionic Variables](#ionic-variables) for more information on the global variables Ionic provides.
@@ -41,7 +41,7 @@ When using the Ionic CLI to start an Angular, React or Vue project, the `src/the
}
```
-### Component Variables
+### Component Variables {/* #component-variables */}
To set a CSS variable for a specific component, add the variable inside of its selector. Refer to [Ionic Variables](#ionic-variables) for more information on the component-level variables Ionic provides.
@@ -57,7 +57,7 @@ ion-button {
}
```
-### Variables set via JavaScript
+### Variables set via JavaScript {/* #variables-set-via-javascript */}
CSS variables can also be changed via JavaScript using [setProperty()](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/setProperty):
@@ -66,9 +66,9 @@ const el = document.querySelector('.fancy-button');
el.style.setProperty('--background', '#36454f');
```
-## Getting Values
+## Getting Values {/* #getting-values */}
-### Using CSS
+### Using CSS {/* #using-css */}
The [var() CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/var) can be used to get the value of a CSS variable, along with any number of fallback values, if desired. In the below example, the `--background` property will be set to the value of the `--charcoal` variable, if defined, and if not it will use `#36454f`.
@@ -78,7 +78,7 @@ The [var() CSS function](https://developer.mozilla.org/en-US/docs/Web/CSS/var) c
}
```
-### Using JavaScript
+### Using JavaScript {/* #using-javascript */}
The value of a CSS variable can be read in JavaScript using [getPropertyValue()](https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleDeclaration/getPropertyValue):
@@ -87,12 +87,12 @@ const el = document.querySelector('.fancy-button');
const color = el.style.getPropertyValue('--background');
```
-## Ionic Variables
+## Ionic Variables {/* #ionic-variables */}
-### Component Variables
+### Component Variables {/* #component-variables-1 */}
Ionic provides variables that exist at the component level, such as `--background` and `--color`. For a list of the custom properties a component accepts, view the `CSS Custom Properties` section of its [API reference](../api.mdx). For example, refer to the [Button CSS Custom Properties](../api/button.mdx#css-custom-properties).
-### Global Variables
+### Global Variables {/* #global-variables-1 */}
There are several global variables that Ionic provides in order to make theming an entire application easier. For more information, refer to [Colors](colors.mdx), [Themes](themes.mdx) and [Advanced Theming](advanced.mdx).
diff --git a/versioned_docs/version-v9/theming/dark-mode.mdx b/versioned_docs/version-v9/theming/dark-mode.mdx
index da28604d9e3..40bf87e3629 100644
--- a/versioned_docs/version-v9/theming/dark-mode.mdx
+++ b/versioned_docs/version-v9/theming/dark-mode.mdx
@@ -15,11 +15,11 @@ import TabItem from '@theme/TabItem';
Ionic makes it easy to change the palettes of your app, including supporting dark color schemes. Dark mode is a display setting that changes all of an app's views to a dark palette. It has system-wide support on iOS and Android, making it highly desirable for developers to add to their apps.
-## Enabling Dark Palette
+## Enabling Dark Palette {/* #enabling-dark-palette */}
There are three provided ways to enable the dark palette in an app: **always**, based on **system** settings, or by using a CSS **class**.
-### Always
+### Always {/* #always */}
The default palette provided with Ionic Framework is a light palette, consisting of a light background and dark text. However, the default palette can be changed to the dark palette by importing the following stylesheet in the appropriate files:
@@ -70,7 +70,7 @@ Avoid targeting the `.ios` or `.md` selectors to override the Ionic dark palette
:::
-### System
+### System {/* #system */}
The system approach to enable dark mode involves checking the system settings for the user's preferred color scheme. This is the default when starting a new Ionic Framework app. Importing the following stylesheet in the appropriate file will automatically retrieve the user's preference from the system settings and apply the dark palette when dark mode is preferred:
@@ -127,7 +127,7 @@ Avoid targeting the `.ios` or `.md` selectors to override the Ionic dark palette
:::
-### CSS Class
+### CSS Class {/* #css-class */}
While the previous approaches are excellent for enabling the dark palette through file imports alone, there are scenarios where you may need more control over its application. In cases where you need to apply the dark palette conditionally, such as through a toggle, or if you want to extend the functionality based on system settings, we provide a dark palette class file. This file applies the dark palette when a specific class is added to an app. Importing the following stylesheet into the appropriate file will provide the necessary styles for using the dark palette with the class:
@@ -184,7 +184,7 @@ The `.ion-palette-dark` class **must** be added to the `html` element in order t
:::
-## Adjusting System UI Components
+## Adjusting System UI Components {/* #adjusting-system-ui-components */}
When developing a dark palette, you may notice that certain system UI components are not adjusting to dark mode properly. To fix this you will need to specify the `color-scheme`. Refer to the [browser compatibility for color-scheme](https://caniuse.com/#feat=mdn-html_elements_meta_name_color-scheme) for details on cross browser support.
@@ -218,7 +218,7 @@ For developers looking to customize the theme color under the status bar in Safa
:::
-## Ionic Dark Palette
+## Ionic Dark Palette {/* #ionic-dark-palette */}
Ionic has a recommended dark palette that can be enabled in three different ways: [always](#always), based on [system](#system) settings, or by using a [CSS class](#css-class). Each of these methods involves importing the dark palette file with the corresponding name.
diff --git a/versioned_docs/version-v9/theming/high-contrast-mode.mdx b/versioned_docs/version-v9/theming/high-contrast-mode.mdx
index 8574ac4de30..4ab7fb8e7aa 100644
--- a/versioned_docs/version-v9/theming/high-contrast-mode.mdx
+++ b/versioned_docs/version-v9/theming/high-contrast-mode.mdx
@@ -15,15 +15,15 @@ import TabItem from '@theme/TabItem';
Ionic offers palettes with increased contrast for users with low vision. These palettes work by amplifying the contrast between foreground content, such as text, and background content, such as UI components. Ionic provides both light and dark variants for achieving high contrast.
-## Overview
+## Overview {/* #overview */}
The default palette in Ionic provides [Ionic colors](./colors.mdx) that meet [Level AA color contrast](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html) as defined by Web Content Accessibility Guidelines (WCAG) when used with the appropriate contrast color. The [Ionic colors](./colors.mdx) in the high contrast palette have been updated to meet [Level AAA color contrast](https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced.html) when used with the appropriate contrast color. Notably, improvements have been made to the contrast of UI components, including border, text, and background colors. However, it's important to note that within the high contrast palette, priority is given to text legibility. This means that if adjusting the contrast of a UI component against the page background would significantly compromise the contrast between the component's text and its background, the contrast of the UI component background will remain unchanged.
-## Enabling High Contrast Theme
+## Enabling High Contrast Theme {/* #enabling-high-contrast-theme */}
There are three provided ways to enable the high contrast palette in an app: **always**, based on **system** settings, or by using a CSS **class**.
-### Always
+### Always {/* #always */}
The high contrast palette can be enabled by importing the following stylesheet in the appropriate files. This approach will enable the high contrast palette regardless of the system settings for contrast preference.
@@ -72,7 +72,7 @@ import AlwaysHighContrastMode from '@site/static/usage/v9/theming/always-high-co
-### System
+### System {/* #system */}
The system approach to enabling high contrast mode involves checking the system settings for the user's preferred contrast. This is the default when starting a new Ionic Framework app. Importing the following stylesheets in the appropriate file will automatically retrieve the user's preference from the system settings and apply the high contrast palette when high contrast is preferred.
@@ -136,7 +136,7 @@ high contrast dark palette must be imported after `dark.system.css`. Otherwise,
:::
-### CSS Class
+### CSS Class {/* #css-class */}
While the previous approaches are excellent for enabling the high contrast palette through file imports alone, there are scenarios where you may need more control over where it is applied. In cases where you need to apply the high contrast palette conditionally, such as through a toggle, or if you want to extend the functionality based on system settings, we provide a high contrast palette class file. This file applies the high contrast palette when a specific class is added to an app. Importing the following stylesheets into the appropriate file will provide the necessary styles for using the high contrast palette with the class:
@@ -205,7 +205,7 @@ The `.ion-palette-high-contrast` class **must** be added to the `html` element i
:::
-## Customizing Ionic High Contrast Theme
+## Customizing Ionic High Contrast Theme {/* #customizing-ionic-high-contrast-theme */}
Ionic has a recommended high contrast palette that can be enabled in three different ways: [always](#always), based on [system](#system) settings, or by using a [CSS class](#css-class). Each of these methods involves importing the high contrast palette file with the corresponding name.
diff --git a/versioned_docs/version-v9/theming/platform-styles.mdx b/versioned_docs/version-v9/theming/platform-styles.mdx
index e58a1be4579..c0454506087 100644
--- a/versioned_docs/version-v9/theming/platform-styles.mdx
+++ b/versioned_docs/version-v9/theming/platform-styles.mdx
@@ -12,7 +12,7 @@ title: Platform Styles
Ionic provides platform specific styles based on the device the application is running on. Styling the components to match the device guidelines allows the application to be written once but look and feel native to the user depending on where it is accessed.
-## Ionic Modes
+## Ionic Modes {/* #ionic-modes */}
Ionic uses **modes** to customize the look of components. Each **platform** has a default **mode**, but this can be overridden through the global [config](../developing/config.mdx). The following chart displays the default **mode** that is added to each **platform**:
@@ -30,7 +30,7 @@ For example, an app being viewed on an Android platform will use the `md` (Mater
_Note: The **platform** and the **mode** are not the same. The platform can be set to use any mode in the [config](../developing/config.mdx) of an app._
-## Overriding Mode Styles
+## Overriding Mode Styles {/* #overriding-mode-styles */}
Each Ionic component can be styled based on the mode. The `html` element has both a `class` and `mode` attribute with a value equal to the current mode. These can be used to override styles for any component. For example, to style an `ion-badge` to have `uppercase` text only in `ios` mode:
diff --git a/versioned_docs/version-v9/theming/themes.mdx b/versioned_docs/version-v9/theming/themes.mdx
index 4b68041ec92..2f7d141843a 100644
--- a/versioned_docs/version-v9/theming/themes.mdx
+++ b/versioned_docs/version-v9/theming/themes.mdx
@@ -15,7 +15,7 @@ import SteppedColorGenerator from '@components/page/theming/SteppedColorGenerato
Ionic provides several global variables that are used throughout components to change the default theme of an entire application. [Application Colors](#application-colors) are useful to change the look of most of the Ionic components, and [Stepped Colors](#stepped-colors) are used as variations in some of the Ionic components.
-## Application Colors
+## Application Colors {/* #application-colors */}
The application colors are used in multiple places in Ionic. These are useful for easily creating dark palettes or themes that match a brand.
@@ -50,7 +50,7 @@ It is important to note that the background and text color variables also requir
| `--ion-item-color` | Color of the components in the Item |
| `--ion-placeholder-color` | Color of the placeholder in Inputs |
-## Stepped Colors
+## Stepped Colors {/* #stepped-colors */}
After exploring different ways to customize the Ionic theme, we found that we couldn't use just one background or text color. In order to imply importance and depth throughout the design, we need to use different shades of the background and text colors. To accommodate this pattern, we created stepped colors.
@@ -62,7 +62,7 @@ Ionic provides separate step colors for text and background colors so they can b
By default, the Ionic text stepped colors start at the default text color value #000000 and mix with the background color value #ffffff using an increasing percentage. The Ionic background stepped colors start at the default background color value #ffffff and mix with the text color value #000000 using an increasing percentage. The full list of stepped colors is shown in the generator below.
-## Stepped Color Generator
+## Stepped Color Generator {/* #stepped-color-generator */}
Create a custom background and text color theme for your app. Update the background or text color’s hex values below, then copy and paste the generated code directly into your Ionic project.
diff --git a/versioned_docs/version-v9/troubleshooting/build.mdx b/versioned_docs/version-v9/troubleshooting/build.mdx
index c7eddca3913..434837fac40 100644
--- a/versioned_docs/version-v9/troubleshooting/build.mdx
+++ b/versioned_docs/version-v9/troubleshooting/build.mdx
@@ -10,9 +10,9 @@ title: Build Errors
/>
-## Common mistakes
+## Common mistakes {/* #common-mistakes */}
-### Forgetting Parentheses on a Decorator
+### Forgetting Parentheses on a Decorator {/* #forgetting-parentheses-on-a-decorator */}
Decorators should have parentheses `()` after an annotation. Some examples include: `@Injectable()`, `@Optional()`, `@Input()`, etc.
@@ -27,9 +27,9 @@ class MyDirective {
}
```
-## Common Errors
+## Common Errors {/* #common-errors */}
-### Cannot Resolve all Parameters
+### Cannot Resolve all Parameters {/* #cannot-resolve-all-parameters */}
```shell
Cannot resolve all parameters for 'YourClass'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'YourClass' is decorated with Injectable.
@@ -77,7 +77,7 @@ class MyIcon {
}
```
-### No provider for ParamType
+### No provider for ParamType {/* #no-provider-for-paramtype */}
```shell
No provider for ParamType! (MyClass -> ParamType)
@@ -168,7 +168,7 @@ class MyDir {
}
```
-### Can't bind to 'propertyName' since it isn't a known property
+### Can't bind to 'propertyName' since it isn't a known property {/* #cant-bind-to-propertyname-since-it-isnt-a-known-property */}
```shell
Can't bind to 'propertyName' since it isn't a known property of the 'elementName' element and there are no matching directives with a corresponding property
@@ -181,7 +181,7 @@ This happens when you try and bind a property on an element that doesn't have th
```
-### No provider for ControlContainer
+### No provider for ControlContainer {/* #no-provider-for-controlcontainer */}
```shell
No provider for ControlContainer! (NgControlName -> ControlContainer)
@@ -198,7 +198,7 @@ This error is a more specific version of the `No provider` error above. It happe
})
```
-### No Component Factory Found
+### No Component Factory Found {/* #no-component-factory-found */}
```shell
No component factory found for
diff --git a/versioned_docs/version-v9/troubleshooting/cors.mdx b/versioned_docs/version-v9/troubleshooting/cors.mdx
index 024f06e04f2..60103cab709 100644
--- a/versioned_docs/version-v9/troubleshooting/cors.mdx
+++ b/versioned_docs/version-v9/troubleshooting/cors.mdx
@@ -10,7 +10,7 @@ title: CORS Errors
/>
-## What is CORS?
+## What is CORS? {/* #what-is-cors */}
**Cross-Origin Resource Sharing (CORS)** is a mechanism that browsers and webviews — like the ones powering Capacitor and Cordova — use to restrict HTTP and HTTPS requests made from scripts to resources in a different origin for security reasons, mainly to protect your user's data and prevent attacks that would compromise your app.
@@ -28,9 +28,9 @@ XMLHttpRequest cannot load https://api.example.com. No 'Access-Control-Allow-Ori
:::
-## How does CORS work
+## How does CORS work {/* #how-does-cors-work */}
-### Request with preflight
+### Request with preflight {/* #request-with-preflight */}
By default, when a web app tries to make a cross-origin request the browser sends a **preflight request** before the actual request. This preflight request is needed in order to know if the external resource supports CORS and if the actual request can be sent safely, since it may impact user data.
@@ -86,7 +86,7 @@ If the returned origin and method don't match the ones from the actual request,
In our example, since the API expects JSON, all `POST` requests will have a `Content-Type: application/json` header and always be preflighted.
-### Simple requests
+### Simple requests {/* #simple-requests */}
Some requests are always considered safe to send and don't need a preflight if they meet all of the following conditions:
@@ -112,9 +112,9 @@ Some requests are always considered safe to send and don't need a preflight if t
In our example API, `GET` requests don't need to be preflighted because no JSON data is being sent, and so the app doesn't need to use the `Content-Type: application/json` header. They will always be simple requests.
-## CORS Headers
+## CORS Headers {/* #cors-headers */}
-### Server Headers (Response)
+### Server Headers (Response) {/* #server-headers-response */}
| Header | Value | Description |
| -------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
@@ -125,26 +125,26 @@ In our example API, `GET` requests don't need to be preflighted because no JSON
| Access-Control-Expose-Headers | `headers` | Specifies the headers that the browser is allowed to access. |
| Access-Control-Max-Age | `seconds` | Indicates how long the results of a preflight request can be cached. |
-### Browser Headers (Request)
+### Browser Headers (Request) {/* #browser-headers-request */}
The browser automatically sends the appropriate headers for CORS in every request to the server, including the preflight requests. Please note that the headers below are for reference only, and **should not be set in your app code** (the browser will ignore them).
-#### All Requests
+#### All Requests {/* #all-requests */}
| Header | Value | Description |
| ---------- | -------- | ------------------------------------ |
| **Origin** | `origin` | Indicates the origin of the request. |
-#### Preflight Requests
+#### Preflight Requests {/* #preflight-requests */}
| Header | Value | Description |
| --------------------------------- | --------- | ------------------------------------------------------------------------------------------------- |
| **Access-Control-Request-Method** | `method` | Used to let the server know what method will be used when the actual request is made. |
| Access-Control-Request-Headers | `headers` | Used to let the server know what non-simple headers will be used when the actual request is made. |
-## Solutions for CORS Errors
+## Solutions for CORS Errors {/* #solutions-for-cors-errors */}
-### A. Enabling CORS in a server you control
+### A. Enabling CORS in a server you control {/* #a-enabling-cors-in-a-server-you-control */}
The correct and easiest solution is to enable CORS by returning the [right response headers](#server-headers-response) from the web server or backend and responding to preflight requests, as it allows to keep using `XMLHttpRequest`, `fetch`, or abstractions like `HttpClient` in Angular.
@@ -154,7 +154,7 @@ Please note that all of the `Access-Control-Allow-*` headers have to be sent fro
Here are some of the origins your Ionic app may be served from:
-#### Capacitor
+#### Capacitor {/* #capacitor */}
| Platform | Origin |
| -------- | ----------------------- |
@@ -163,7 +163,7 @@ Here are some of the origins your Ionic app may be served from:
Replace `localhost` with your own hostname if you have changed the default in the Capacitor config.
-#### Ionic WebView 3.x plugin on Cordova
+#### Ionic WebView 3.x plugin on Cordova {/* #ionic-webview-3x-plugin-on-cordova */}
| Platform | Origin |
| -------- | ------------------- |
@@ -172,7 +172,7 @@ Replace `localhost` with your own hostname if you have changed the default in th
Replace `localhost` with your own hostname if you have changed the default in the plugin config.
-#### Ionic WebView 2.x plugin on Cordova
+#### Ionic WebView 2.x plugin on Cordova {/* #ionic-webview-2x-plugin-on-cordova */}
| Platform | Origin |
| -------- | ----------------------- |
@@ -181,7 +181,7 @@ Replace `localhost` with your own hostname if you have changed the default in th
Replace port `8080` with your own if you have changed the default in the plugin config.
-#### Local development in the browser
+#### Local development in the browser {/* #local-development-in-the-browser */}
| Command | Origin |
| ----------------------------- | -------------------------------------------------------- |
@@ -232,19 +232,19 @@ app.listen(3000, () => {
});
```
-### B. Working around CORS in a server you can't control
+### B. Working around CORS in a server you can't control {/* #b-working-around-cors-in-a-server-you-cant-control */}
-#### Don't leak your keys!
+#### Don't leak your keys! {/* #dont-leak-your-keys */}
If you are trying to connect to a 3rd-party API, first check in its documentation that is safe to use it directly from the app (client-side) and that it won't leak any secret/private keys or credentials, as they can be read in clear text in Javascript code. Many APIs don't support CORS on purpose, in order to force developers to use them in the server and protect important information or keys.
-#### 1. Native-only apps (iOS/Android)
+#### 1. Native-only apps (iOS/Android) {/* #1-native-only-apps-iosandroid */}
-##### Capacitor Applications (Recommended)
+##### Capacitor Applications (Recommended) {/* #capacitor-applications-recommended */}
For Capacitor applications, use the [Capacitor HTTP API](https://capacitorjs.com/docs/apis/http). This API patches `fetch` and `XMLHttpRequest` to use native libraries. Please note that if you also deploy the application to a web-based context such as PWA or the local development server (via `ionic serve` for example) you still need to implement CORS for those scenarios.
-##### Legacy Cordova Applications
+##### Legacy Cordova Applications {/* #legacy-cordova-applications */}
For legacy Cordova applications, use the [HTTP plugin with the Awesome Cordova Plugins wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/http). Please note that this plugin doesn't work in the browser, so the development and testing of the app must always be done in a device or simulator going forward.
@@ -280,7 +280,7 @@ export class HomePage {
}
```
-#### 2. Native + PWAs
+#### 2. Native + PWAs {/* #2-native--pwas */}
Send the requests through an HTTP/HTTPS proxy that bypasses them to the external resources and adds the necessary CORS headers to the responses. This proxy must be trusted or under your control, as it will be intercepting most traffic made by the app.
@@ -288,7 +288,7 @@ Also, keep in mind that the browser or webview will not receive the original HTT
Check [cors-anywhere](https://github.com/Rob--W/cors-anywhere/) for a Node.js CORS proxy that can be deployed in your own server. Using free hosted CORS proxies in production is not recommended.
-### C. Disabling CORS or browser web security
+### C. Disabling CORS or browser web security {/* #c-disabling-cors-or-browser-web-security */}
Please be aware that CORS exists for a reason (security of user data and to prevent attacks against your app). **It's not possible or advisable to try to disable CORS**.
@@ -296,7 +296,7 @@ Older webviews like `UIWebView` on iOS don't enforce CORS but are deprecated and
If you are developing a PWA or testing in the browser, using the `--disable-web-security` flag in Google Chrome or an extension to disable CORS is a really bad idea. You will be exposed to all kind of attacks, you can't ask your users to take the risk, and your app won't work once in production.
-##### Sources
+##### Sources {/* #sources */}
- [CORS Errors in Ionic Apps](https://fdezromero.com/cors-errors-in-ionic-apps)
- [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
diff --git a/versioned_docs/version-v9/troubleshooting/debugging.mdx b/versioned_docs/version-v9/troubleshooting/debugging.mdx
index d10f67d5efc..1ffd36330e9 100644
--- a/versioned_docs/version-v9/troubleshooting/debugging.mdx
+++ b/versioned_docs/version-v9/troubleshooting/debugging.mdx
@@ -19,11 +19,11 @@ title: Debugging
allowFullScreen
>
-## Live Reload
+## Live Reload {/* #live-reload */}
Live Reload is useful for debugging native functionality (such as plugins) on device hardware. Rather than deploy a new native binary each time you make a code change, it reloads the browser (or WebView) when changes in the app are detected. Learn more about [Live Reload](../cli/livereload.mdx).
-## iOS and Safari
+## iOS and Safari {/* #ios-and-safari */}
Safari can be used to debug an Ionic app on a connected iOS device or iOS simulator.
@@ -35,7 +35,7 @@ Run the iOS simulator or connect your iOS device to your Mac, then run the Ionic
Within Safari, select **Develop** in the toolbar. The dropdown menu lists the name of your device and app. Hover over the app name and click on **localhost**. This will open a new window with the Safari Developer Tools - use them to inspect and debug the Ionic app running on your device.
-## Android and Chrome
+## Android and Chrome {/* #android-and-chrome */}
Use Google Chrome's DevTools to debug an app when it is running in the browser using the `ionic serve` command, deployed to an emulator, or on a physical device.
@@ -55,7 +55,7 @@ The app preview may not automatically appear when you open Chrome Developer Tool
:::
-## Debugging with Visual Studio locally in Chrome (both Android & iOS)
+## Debugging with Visual Studio locally in Chrome (both Android & iOS) {/* #debugging-with-visual-studio-locally-in-chrome-both-android--ios */}
[Visual Studio Code](https://code.visualstudio.com/) can also be used to debug an Ionic app running in the Chrome web browser.
@@ -67,7 +67,7 @@ Make sure that the port used in the url property of your `launch.json` file matc
In the debug target dropdown menu, select **Launch against Chrome**, then click run. This will open a new instance of the Chrome browser and VS code will attach to it. You can set breakpoints and use the other debugging tools within VS Code while your app is running in Chrome.
-## Debugging with Visual Studio Code in Android
+## Debugging with Visual Studio Code in Android {/* #debugging-with-visual-studio-code-in-android */}
[Visual Studio Code](https://code.visualstudio.com/) has a dedicated plugin for debugging apps that run in an Android WebView.
diff --git a/versioned_docs/version-v9/troubleshooting/native.mdx b/versioned_docs/version-v9/troubleshooting/native.mdx
index cd288459839..073151db8f6 100644
--- a/versioned_docs/version-v9/troubleshooting/native.mdx
+++ b/versioned_docs/version-v9/troubleshooting/native.mdx
@@ -10,7 +10,7 @@ title: Native Errors
/>
-## Code Signing errors
+## Code Signing errors {/* #code-signing-errors */}
```shell
Code Signing Error: Failed to create provisioning profile. The app ID "com.csform.ionic.yellow" cannot be registered to your development team. Change your bundle identifier to a unique string to try again. Code Signing Error: No profiles for 'com.csform.ionic.yellow' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.csform.ionic.yellow'. Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 11.1'
@@ -42,7 +42,7 @@ Running an app on an iOS device requires a provisioning profile. If a provisioni

-## Xcode build error 65
+## Xcode build error 65 {/* #xcode-build-error-65 */}
```shell
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/ionitron/projects/my-project/platforms/ios/cordova/build-debug.xcconfig,-workspace,SC project.xcworkspace,-scheme,SC project,-configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS Simulator,name=iPhone X,build,CONFIGURATION_BUILD_DIR=/Users/ionitron/projects/my-project/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/ionitron/projects/my-project/platforms/ios/build/sharedpch
@@ -63,7 +63,7 @@ ionic cordova build ios --prod
Once these commands have been ran a fresh build can be done.
-## Clashing Google Play Services versions
+## Clashing Google Play Services versions {/* #clashing-google-play-services-versions */}
```shell
Error: more than one library with package name com.google.android.gms
diff --git a/versioned_docs/version-v9/troubleshooting/runtime.mdx b/versioned_docs/version-v9/troubleshooting/runtime.mdx
index fbcbe8ea140..130e8612214 100644
--- a/versioned_docs/version-v9/troubleshooting/runtime.mdx
+++ b/versioned_docs/version-v9/troubleshooting/runtime.mdx
@@ -10,7 +10,7 @@ title: Runtime Issues
/>
-## Blank App
+## Blank App {/* #blank-app */}
:::note
@@ -42,7 +42,7 @@ Alternatively, a project could be updated to use the latest release of the `@ang
This will automatically include the polyfills for older browsers that need them.
-## Directive Not Working
+## Directive Not Working {/* #directive-not-working */}
:::note
@@ -85,7 +85,7 @@ class MyDir {
class MyPage { }
```
-## Click Delays
+## Click Delays {/* #click-delays */}
:::note
@@ -107,7 +107,7 @@ add the `tappable` attribute to your element.
I am clickable!
```
-## Angular Change Detection
+## Angular Change Detection {/* #angular-change-detection */}
:::note
@@ -151,7 +151,7 @@ This flag is automatically included when creating an Ionic app via the Ionic CLI
:::
-## Cordova plugins not working in the browser
+## Cordova plugins not working in the browser {/* #cordova-plugins-not-working-in-the-browser */}
At some point in your development you may, try to call Cordova plugin, but get a
warning:
@@ -175,7 +175,7 @@ EXCEPTION: Error: Uncaught (in promise): TypeError: undefined is not an object
If this happens, test the plugin on a real device or simulator.
-## Multiple instances of a provider
+## Multiple instances of a provider {/* #multiple-instances-of-a-provider */}
If you inject a provider in every component because you want it available to all
of them you will end up with multiple instances of the provider. You should
diff --git a/versioned_docs/version-v9/updating/4-0.mdx b/versioned_docs/version-v9/updating/4-0.mdx
index 01b422e1e14..261e074c30c 100644
--- a/versioned_docs/version-v9/updating/4-0.mdx
+++ b/versioned_docs/version-v9/updating/4-0.mdx
@@ -7,7 +7,7 @@ import TabItem from '@theme/TabItem';
# Updating to Ionic 4
-## Updating from Ionic 3 to 4
+## Updating from Ionic 3 to 4 {/* #updating-from-ionic-3-to-4 */}
:::note
@@ -37,7 +37,7 @@ We suggest the following general process when migrating an existing application
In many cases, using the Ionic CLI to generate a new object and then copying the code also works very well. For example: `ionic g service weather` will create a shell `Weather` service and test. The code can then be copied from the older project with minor modifications as needed. This helps to ensure the proper structure is followed. This also generates shells for unit tests.
-### Changes in Package Name
+### Changes in Package Name {/* #changes-in-package-name */}
In Ionic 4, the package name is `@ionic/angular`. Uninstall Ionic 3 and install Ionic 4 using the new package name:
@@ -48,7 +48,7 @@ $ npm install @ionic/angular@v4-lts
While migrating an app, update the imports from `ionic-angular` to `@ionic/angular`.
-### Project structure
+### Project structure {/* #project-structure */}
One of the major changes between an Ionic 3 app and an Ionic 4 app is the overall project layout and structure. In v3, Ionic apps had a custom convention for how an app should be set up and what that folder structure should look like. In v4, this has been changed to follow the recommended setup of each supported framework.
@@ -140,11 +140,11 @@ See the following `ionic.config.json` as an example:
}
```
-### RxJS Changes
+### RxJS Changes {/* #rxjs-changes */}
Between V3 and V4, RxJS was updated to version 6. This changes many of the import paths of operators and core RxJS functions. Please refer to the [RxJS Migration Guide](https://github.com/ReactiveX/rxjs/blob/6.x/docs_app/content/guide/v6/migration.md) for details.
-### Lifecycle Events
+### Lifecycle Events {/* #lifecycle-events */}
With V4, we're now able to utilize the typical events provided by [Angular](https://angular.io/guide/lifecycle-hooks). But for certain cases, you might want to have access to the events fired when a component has finished animating during its route change. In this case, the `ionViewWillEnter`, `ionViewDidEnter`, `ionViewWillLeave`, and `ionViewDidLeave` have been ported over from V3. Use these events to coordinate actions with Ionic's own animations system.
@@ -152,7 +152,7 @@ Older events like `ionViewDidLoad`, `ionViewCanLeave`, and `ionViewCanEnter` hav
For more details, check out the [router-outlet docs](../api/router-outlet.mdx)
-### Overlay Components
+### Overlay Components {/* #overlay-components */}
In prior versions of Ionic, overlay components such as Loading, Toast, or Alert were created synchronously. In Ionic v4, these components are all created asynchronously. As a result of this, the API is now promise-based.
@@ -190,7 +190,7 @@ async showAlert() {
}
```
-### Navigation
+### Navigation {/* #navigation */}
In V4, navigation received the most changes. Now, instead of using Ionic's own `NavController`, we integrate with the official Angular Router. This not only provides a consistent routing experience across apps, but is much more dependable. The Angular team has an [excellent guide](http://angular.io/guide/router) on their docs site that covers the Router in great detail.
@@ -198,7 +198,7 @@ To provide the platform-specific animations that users are used to, we have crea
For a detailed explanation in navigation works in a V4 project, check out the [Angular navigation guide](../angular/navigation.mdx).
-### Lazy Loading
+### Lazy Loading {/* #lazy-loading */}
Since Navigation has changed, the mechanism for lazy loading has also changed in V4.
@@ -248,15 +248,15 @@ export class AppModule {}
For a detailed explanation of lazy loading in V4 project, check out the [Angular navigation guide](../angular/navigation.mdx#lazy-loading-routes).
-### Markup Changes
+### Markup Changes {/* #markup-changes */}
Since v4 moved to Custom Elements, there's been a significant change to the markup for each component. These changes have all been made to follow the Custom Elements spec, and have been documented in a [dedicated file on GitHub](https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#breaking-changes).
To help with these markup changes, we've released a TSLint-based [Migration Tool](https://github.com/ionic-team/v4-migration-tslint), which detects issues and can even fix some of them automatically.
-## Updating from Ionic 1 to 4
+## Updating from Ionic 1 to 4 {/* #updating-from-ionic-1-to-4 */}
-### Ionic 1 to Ionic 4: What’s Involved?
+### Ionic 1 to Ionic 4: What’s Involved? {/* #ionic-1-to-ionic-4-whats-involved */}
Migrating from Ionic 1 to Ionic 4 involves moving from AngularJS (aka Angular 1) to Angular 7+. There are many architectural differences between these versions, so some of the app code will have to be rewritten. The amount of work involved depends on the complexity and size of your app.
@@ -268,7 +268,7 @@ Here are some considerations to review before beginning the upgrade:
- **Framework support**: In 2019, Ionic will release full support for React. You can also use Ionic Framework components [without a framework](../intro/cdn.mdx). Since these are not production-ready yet, we recommend sticking with Angular or waiting until the other framework support is available.
- **Budget and team makeup**: The length of a migration project will vary based on the size of your team, the complexity of the app, and the amount of time allotted to make the transition.
-### Suggested Strategy
+### Suggested Strategy {/* #suggested-strategy */}
Once your development team has identified a good time frame for beginning the migration, Ionic recommends feature-freezing the Ionic 1 application and getting the code in order: Fix any major bugs, eliminate tech debt, and reorganize as you see fit. Then, identify which features to migrate over and which to abandon.
@@ -276,14 +276,14 @@ Once the Ionic 1 app is stable, create a new Ionic 4 project. The majority of th
Once the team is comfortable that the Ionic 4 app has become stable and has fulfilled a core set of features, you can then shut down the Ionic 1 app.
-### Moving From AngularJS to Angular
+### Moving From AngularJS to Angular {/* #moving-from-angularjs-to-angular */}
Please reference official [Angular upgrade guide](https://angular.io/guide/upgrade) information.
-### Ionic Changes
+### Ionic Changes {/* #ionic-changes */}
Our Ionic 3 to Ionic 4 migration sections above may prove to be a useful reference. Generate a new Ionic 4 project using the blank starter (refer to [Starting an App](../developing/starting.mdx)). Spend time getting familiar with Ionic 4 components. Happy building!
-### Need Assistance?
+### Need Assistance? {/* #need-assistance */}
If your team would like assistance with the migration, please [reach out to us](https://ionicframework.com/enterprise-engine)! Ionic offers Advisory Services, which includes Ionic 4 training, architecture reviews, and migration assistance.
diff --git a/versioned_docs/version-v9/updating/5-0.mdx b/versioned_docs/version-v9/updating/5-0.mdx
index a844b2dacf3..4d771961d60 100644
--- a/versioned_docs/version-v9/updating/5-0.mdx
+++ b/versioned_docs/version-v9/updating/5-0.mdx
@@ -18,7 +18,7 @@ For a **complete list of breaking changes** from Ionic 4 to Ionic 5, please refe
:::
-### Packages and Dependencies
+### Packages and Dependencies {/* #packages-and-dependencies */}
For Angular based projects, you can simply run:
diff --git a/versioned_docs/version-v9/updating/6-0.mdx b/versioned_docs/version-v9/updating/6-0.mdx
index ed4e01f9a4e..812c6b1fa96 100644
--- a/versioned_docs/version-v9/updating/6-0.mdx
+++ b/versioned_docs/version-v9/updating/6-0.mdx
@@ -16,9 +16,9 @@ For a **complete list of breaking changes** from Ionic 5 to Ionic 6, please refe
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 6 supports Angular 12+. Update to the latest version of Angular by following the [Angular Update Guide](https://update.angular.io/).
2. Update to the latest version of Ionic 6:
@@ -36,7 +36,7 @@ npm install @ionic/angular@6 @ionic/angular-server@6
3. Remove any usage of `Config.set()`. Instead, set your config in `IonicModule.forRoot()`. Refer to the [Angular Config Documentation](../developing/config) for more examples.
4. Remove any usage of the `setupConfig` function previously exported from `@ionic/angular`. Set your config in `IonicModule.forRoot()` instead.
-### React
+### React {/* #react */}
1. Ionic 6 supports React 17+. Update to the latest version of React:
@@ -107,7 +107,7 @@ import { menuController } from '@ionic/core';
import { menuController } from '@ionic/core/components';
```
-### Vue
+### Vue {/* #vue */}
1. Ionic 6 supports Vue 3.0.6+. Update to the latest version of Vue:
@@ -300,7 +300,7 @@ const routes: Array = [
];
```
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 6:
@@ -308,9 +308,9 @@ const routes: Array = [
npm install @ionic/core@6
```
-## Updating Your Code
+## Updating Your Code {/* #updating-your-code */}
-### Datetime
+### Datetime {/* #datetime */}
1. Remove any usages of the `placeholder`, `pickerOptions`, `pickerFormat`, `monthNames`, `monthShortNames`, `dayNames`, and `dayShortNames` properties. `ion-datetime` now automatically formats the month names, day names, and time displayed inside of the component according to the language and region set on the device. Refer to the [ion-datetime Localization Documentation](../api/datetime#localization) for more information.
@@ -328,15 +328,15 @@ Refer to the [Datetime Migration Sample Application](https://github.com/ionic-te
:::
-### Icon
+### Icon {/* #icon */}
Ionic 6 now ships with Ionicons 6. Review the [Ionicons 6 Breaking Changes Guide](https://github.com/ionic-team/ionicons/releases/tag/v6.0.0) and make any necessary changes.
-### Input
+### Input {/* #input */}
Ensure `null` is not passed in as a value to the `placeholder` property. We recommend using `undefined` instead.
-### Modal
+### Modal {/* #modal */}
`ion-modal` now uses the Shadow DOM. Update any styles targeting the internals of `ion-modal` to use either the [ion-modal CSS Variables](../api/modal#css-custom-properties) or the [ion-modal CSS Shadow Parts](../api/modal#css-shadow-parts):
@@ -364,7 +364,7 @@ ion-modal::part(backdrop) {
}
```
-### Popover
+### Popover {/* #popover */}
`ion-popover` now uses the Shadow DOM. Update any styles targeting the internals of `ion-popover` to use either [ion-popover CSS Variables](../api/popover#css-custom-properties) or the [ion-popover CSS Shadow Parts](../api/popover#css-shadow-parts):
@@ -400,19 +400,19 @@ ion-popover::part(content) {
}
```
-### Radio
+### Radio {/* #radio */}
Remove any usage of the `RadioChangeEventDetail` interface.
-### Select
+### Select {/* #select */}
Ensure `null` is not passed in as a value to the `placeholder` property. We recommend using `undefined` instead.
-### Textarea
+### Textarea {/* #textarea */}
Ensure `null` is not passed in as a value to the `placeholder` property. We recommend using `undefined` instead.
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -426,7 +426,7 @@ Safari >=13
iOS >=13
```
-### Testing
+### Testing {/* #testing */}
Ionic 6 now ships as ES Modules. ES Modules are supported in all major browsers and bring developer experience and code maintenance improvements. Developers testing with Jest will need to update their Jest configuration as Jest does not have full support for ES Modules as of Jest 27.
@@ -473,7 +473,7 @@ If you are still running into issues, here are a couple things to try:
2. If you have a `browserslist/test` field in `package.json` file, make sure it is set to `current node`.
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to review the [Ionic 6 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING_ARCHIVE/v6.md). There were several changes to default property and CSS Variable values that developers may need to be aware of. Only the breaking changes that required user action are listed on this page.
diff --git a/versioned_docs/version-v9/updating/7-0.mdx b/versioned_docs/version-v9/updating/7-0.mdx
index 2c4ae234f95..df7ab8f0452 100644
--- a/versioned_docs/version-v9/updating/7-0.mdx
+++ b/versioned_docs/version-v9/updating/7-0.mdx
@@ -16,9 +16,9 @@ For a **complete list of breaking changes** from Ionic 6 to Ionic 7, please refe
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 7 supports Angular 14+. Update to the latest version of Angular by following the [Angular Update Guide](https://update.angular.io/).
2. If your project is using rxjs, Ionic 7 requires a minimum rxjs version of 7.5.0:
@@ -41,7 +41,7 @@ npm install @ionic/angular@7 @ionic/angular-server@7 @ionic/angular-toolkit@9
> Note: `@ionic/angular-toolkit@9` requires a minimum of Angular 15. If you are still on Angular 14, then you can skip updating to `@ionic/angular-toolkit@9`.
-### React
+### React {/* #react */}
1. Ionic 7 supports React 17+. Update to the latest version of React:
@@ -55,7 +55,7 @@ npm install react@latest react-dom@latest
npm install @ionic/react@7 @ionic/react-router@7
```
-### Vue
+### Vue {/* #vue */}
1. Ionic 7 supports Vue 3.0.6+. Update to the latest version of Vue:
@@ -69,7 +69,7 @@ npm install vue@latest vue-router@latest
npm install @ionic/vue@7 @ionic/vue-router@7
```
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 7:
@@ -77,9 +77,9 @@ npm install @ionic/vue@7 @ionic/vue-router@7
npm install @ionic/core@7
```
-## Updating Your Code
+## Updating Your Code {/* #updating-your-code */}
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -94,41 +94,41 @@ Safari >=14
iOS >=14
```
-### Types
+### Types {/* #types */}
1. `ActionSheetAttributes`, `AlertAttributes`, `AlertTextareaAttributes`, `AlertInputAttributes`, `LoadingAttributes`, `ModalAttributes`, `PickerAttributes`, `PopoverAttributes`, and `ToastAttributes` have been removed. Developers should use `{ [key: string]: any }` instead.
-### Checkbox
+### Checkbox {/* #checkbox */}
1. Rename any usages of the `--background` and `--background-checked` CSS Variables to `--checkbox-background` and `--checkbox-background-checked`, respectively.
-### Datetime
+### Datetime {/* #datetime */}
1. Remove any code that sets the `value` property to the empty string (`''`).
2. Remove any code that accesses the time zone information on the `value` property. Datetime does not manage time zones, so any time zone information provided is ignored.
-### Input
+### Input {/* #input */}
1. Update any code that accesses the `detail` payload for the `ionInput` event from `event.detail` to `event.detail.value` as the detail payload is now an object containing a value and an event.
-### Modal
+### Modal {/* #modal */}
1. Remove any usage of the `swipeToClose` property. Card modals are swipeable by default, so you can remove `swipeToClose` if you want your card modal to remain swipeable. Use the [canDismiss](https://ionicframework.com/docs/api/modal#preventing-a-modal-from-dismissing) property if you want to prevent a modal from dismissing.
2. Remove any code that sets the `canDismiss` property to `undefined`. The `canDismiss` property now defaults to `true`, so this code is no longer needed.
-### Picker
+### Picker {/* #picker */}
1. Remove any code that accesses `refresh` on `ion-picker-column`. Developers should use the `columns` property on `ion-picker` to refresh the view instead.
-### Searchbar
+### Searchbar {/* #searchbar */}
1. Update any code that accesses the `detail` payload for the `ionInput` event from `event.detail` to `event.detail.value` as the detail payload is now an object containing a value and an event.
-### Segment
+### Segment {/* #segment */}
1. Remove any code that sets the `value` property to `null`. Developers should use either `''` or `undefined` instead.
-### Slides
+### Slides {/* #slides */}
1. Remove `ion-slides`, `ion-slide`, and any associated types. These components have been removed in favor of using Swiper.js directly. The guides below contain more information about this migration:
@@ -136,15 +136,15 @@ iOS >=14
[React Migration Guide](https://ionicframework.com/docs/react/slides)
[Vue Migration Guide](https://ionicframework.com/docs/vue/slides)
-### Textarea
+### Textarea {/* #textarea */}
1. Update any code that accesses the `detail` payload for the `ionInput` event from `event.detail` to `event.detail.value` as the detail payload is now an object containing a value and an event.
-### Toggle
+### Toggle {/* #toggle */}
1. Rename any usages of the `--background` and `--background-checked` CSS Variables to `--track-background` and `--track-background-checked`, respectively.
-### Virtual Scroll
+### Virtual Scroll {/* #virtual-scroll */}
1. Remove `ion-virtual-scroll` and any associated types. This component has been removed in favor of using virtual scroll solutions provided by JavaScript Frameworks. The guides below contain more information about this migration:
@@ -152,7 +152,7 @@ iOS >=14
[React Migration Guide](https://ionicframework.com/docs/react/virtual-scroll)
[Vue Migration Guide](https://ionicframework.com/docs/vue/virtual-scroll)
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to review the [Ionic 7 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-7x). There were several changes to default property and CSS Variable values that developers may need to be aware of. Only the breaking changes that require user action are listed on this page.
diff --git a/versioned_docs/version-v9/updating/8-0.mdx b/versioned_docs/version-v9/updating/8-0.mdx
index f501b609e28..634da530d9e 100644
--- a/versioned_docs/version-v9/updating/8-0.mdx
+++ b/versioned_docs/version-v9/updating/8-0.mdx
@@ -16,9 +16,9 @@ For a **complete list of breaking changes** from Ionic 7 to Ionic 8, please refe
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 8 supports Angular 16+. Update to the latest version of Angular by following the [Angular Update Guide](https://update.angular.io/).
@@ -38,7 +38,7 @@ npm install @ionic/angular@latest @ionic/angular-server@latest @ionic/angular-to
3. Update any `IonBackButtonDelegate` imports from `@ionic/angular` to import `IonBackButton` from `@ionic/angular` instead.
-### React
+### React {/* #react */}
1. Ionic 8 supports React 17+. Update to the latest version of React:
@@ -52,7 +52,7 @@ npm install react@17 react-dom@17
npm install @ionic/react@8 @ionic/react-router@8
```
-### Vue
+### Vue {/* #vue */}
1. Ionic 8 supports Vue 3.0.6+. Update to the latest version of Vue:
@@ -66,7 +66,7 @@ npm install vue@^3.0.6 vue-router@^3.0.6
npm install @ionic/vue@8 @ionic/vue-router@8
```
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 8:
@@ -74,11 +74,11 @@ npm install @ionic/vue@8 @ionic/vue-router@8
npm install @ionic/core@8
```
-## Recommended Changes
+## Recommended Changes {/* #recommended-changes */}
The following changes are not required to update to Ionic 8 as your application will continue to work. However, we recommend making the following changes to ensure you can use the new features in Ionic 8.
-### Light Palette
+### Light Palette {/* #light-palette */}
Previous versions defined a set of default color variables for the light palette in `theme/variables.scss`:
@@ -100,7 +100,7 @@ Developers who are customizing this color palette can continue to keep the custo
You can read more about the new color palette in the [Ionic v8 announcement](https://ionic.io/blog/announcing-the-ionic-8-beta).
-### Dark Palette
+### Dark Palette {/* #dark-palette */}
In previous versions, it was recommended to define the dark palette in the following way:
@@ -134,7 +134,7 @@ While migrating to include the new dark palette files is unlikely to cause break
For more information on the new dark palette files, refer to the [Dark Mode documentation](../theming/dark-mode).
-### Step Color Tokens
+### Step Color Tokens {/* #step-color-tokens */}
To better support the high contrast palette in Ionic 8, separate step colors tokens have been introduced for text and background color. Previously both text and background color were controlled by a single set of `--ion-color-step-[number]` tokens.
@@ -170,7 +170,7 @@ button { color: var(--ion-text-color-step-600); /* 1000 - 400 = 600 */ }
The [stepped color generator](../theming/themes#stepped-color-generator) has been updated to generate text and background color stepped variables.
-### Dynamic Font
+### Dynamic Font {/* #dynamic-font */}
The `core.css` file has been updated to enable dynamic font scaling by default.
@@ -182,7 +182,7 @@ Developers who want to disable dynamic font scaling can set `--ion-dynamic-font:
For more information on the dynamic font, refer to the [Dynamic Font Scaling documentation](../layout/dynamic-font-scaling).
-### (Angular Only) `angular.json` CSS import order
+### (Angular Only) `angular.json` CSS import order {/* #angular-only-angularjson-css-import-order */}
The `angular.json` file currently imports `src/theme/variables.scss` before importing `src/global.scss`. This may cause the incorrect styles to be applied when customizing the new [Dark Palette](#dark-palette) changes.
@@ -200,9 +200,9 @@ We recommend importing the `src/global.scss` file first instead:
"styles": ["src/global.scss", "src/theme/variables.scss"],
```
-## Required Changes
+## Required Changes {/* #required-changes */}
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -217,51 +217,51 @@ Safari >=15
iOS >=15
```
-### Checkbox
+### Checkbox {/* #checkbox */}
1. Migrate any remaining instances of Checkbox to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/checkbox#migrating-from-legacy-checkbox-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Input
+### Input {/* #input */}
1. Remove any usages of the `size` property. CSS should be used to specify the visible width of the input instead.
2. Remove any usages of the `accept` property.
3. Migrate any remaining instances of Input to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/input#migrating-from-legacy-input-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Item
+### Item {/* #item */}
1. Remove any usages of the `counter` or `counterFormatter` properties. Use the properties of the same names on `ion-input` and `ion-textarea` instead.
2. Remove any usages of the `helper` or `error` slots. Use the `helperText` and `errorText` properties on `ion-input` and `ion-textarea` instead.
3. Remove any usages of the `fill` or `shape` properties. Use the properties of the same names on `ion-input`, `ion-textarea`, and `ion-select` instead.
-### Nav
+### Nav {/* #nav */}
1. Update any usages of `getLength` to `await` the call before accessing the returned value as this method now returns `Promise` instead of `number`.
-### Picker
+### Picker {/* #picker */}
1. Ionic 8 now ships with an inline `ion-picker` component. Developers who wish to continue using the legacy picker should update any `ion-picker` usages to `ion-picker-legacy`. The `pickerController` import remains unchanged. Note that the `ion-picker-legacy` component will be removed in an upcoming major release of Ionic. Refer to the [Picker documentation](../api/picker) for usage information.
-### Toast
+### Toast {/* #toast */}
1. Remove any usages of the `cssClass` property from `ToastButton`. The `button` CSS Shadow Part should be used instead.
-### Radio
+### Radio {/* #radio */}
1. Migrate any remaining instances of Radio to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/radio#migrating-from-legacy-radio-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Select
+### Select {/* #select */}
1. Migrate any remaining instances of Select to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/select#migrating-from-legacy-select-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Textarea
+### Textarea {/* #textarea */}
1. Migrate any remaining instances of Textarea to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/textarea#migrating-from-legacy-textarea-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-### Toggle
+### Toggle {/* #toggle */}
1. Migrate any remaining instances of Toggle to use the [modern form control syntax](https://ionic-docs-mt82qcyb0-ionic1.vercel.app/docs/v7/api/toggle#migrating-from-legacy-toggle-syntax). Additionally, remove any usages of the `legacy` property as the legacy form control syntax has been removed.
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to review the [Ionic 8 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-8x). There were several changes to default property and CSS Variable values that developers may need to be aware of. Only the breaking changes that require user action are listed on this page.
diff --git a/versioned_docs/version-v9/updating/9-0.mdx b/versioned_docs/version-v9/updating/9-0.mdx
index 88a4a542c4c..d70fbb75c09 100644
--- a/versioned_docs/version-v9/updating/9-0.mdx
+++ b/versioned_docs/version-v9/updating/9-0.mdx
@@ -16,7 +16,7 @@ For a **complete list of breaking changes** from Ionic 8 to Ionic 9, please refe
:::
-## Automated Migration
+## Automated Migration {/* #automated-migration */}
Before manually working through the changes below, you can run the Ionic migration tool. It scans your app, automatically applies the breaking changes that can be safely migrated, and prints a checklist of the remaining updates that require manual work. Each item includes the affected file, line number, and a link to the corresponding section of this guide. Because the tool reads your framework and version from `package.json`, it only applies migrations that are relevant to your app.
@@ -45,9 +45,9 @@ Run `npx @ionic/migrate --help` for the full list.
The tool is single-shot. Once it bumps your `@ionic/*` version, a re-run detects the new major and does nothing, so run it once per major upgrade and review the diff before committing.
-## Getting Started
+## Getting Started {/* #getting-started */}
-### Angular
+### Angular {/* #angular */}
1. Ionic 9 supports Angular 18 through 22. Angular 16 and 17 are no longer supported. Update to a supported version of Angular by following the [Angular Update Guide](https://update.angular.io/).
@@ -63,7 +63,7 @@ If you are using Ionic Angular Server and Ionic Angular Toolkit, be sure to upda
npm install @ionic/angular@latest @ionic/angular-server@latest @ionic/angular-toolkit@latest
```
-#### Zoneless Change Detection
+#### Zoneless Change Detection {/* #zoneless-change-detection */}
Ionic 9 supports zoneless change detection. Angular 21 made zoneless the default, so a new Ionic 9 app on Angular 21 or later runs without Zone.js out of the box and no change-detection provider is required.
@@ -75,7 +75,7 @@ On Angular 18 through 20, Zone.js remains Angular's default, so those versions a
:::
-##### Keeping Zone.js
+##### Keeping Zone.js {/* #keeping-zonejs */}
If you prefer to keep using Zone.js on Angular 21 or later, opt back in with `provideZoneChangeDetection()`.
@@ -121,7 +121,7 @@ If your project uses a polyfills file instead (for example, Ionic starters set `
import 'zone.js';
```
-#### OnPush Change Detection on Angular 22
+#### OnPush Change Detection on Angular 22 {/* #onpush-change-detection-on-angular-22 */}
Angular 22 changes the default change detection strategy to `OnPush` for components that don't declare one. Combined with the zoneless default above, component state you mutate as a plain field from an Ionic lifecycle hook (`ionViewWillEnter`, and so on) no longer re-renders on its own.
@@ -148,23 +148,23 @@ Ionic's own Angular components already declare `OnPush`, so they are unaffected.
:::
-#### TypeScript
+#### TypeScript {/* #typescript */}
Ionic 9 supports TypeScript 5.4 or later, matching the minimum for Angular 18. Angular 21 requires TypeScript 5.9 or later, and Angular 22 requires TypeScript 6.0 or later.
-#### Node.js
+#### Node.js {/* #nodejs */}
Angular 22 raises the minimum Node.js version to `^22.22.3 || ^24.15.0 || ^26.0.0`. Angular 18 through 21 are unaffected.
-#### Component Imports
+#### Component Imports {/* #component-imports */}
Ionic 9 makes standalone components the default import path. Change lazy-loaded component imports from `@ionic/angular` to `@ionic/angular/lazy`. Change standalone component imports from `@ionic/angular/standalone` to `@ionic/angular`.
-#### IonicModule Deprecation
+#### IonicModule Deprecation {/* #ionicmodule-deprecation */}
`IonicModule` is deprecated in Ionic 9 and will be removed in a future major version. It remains fully functional, so no immediate action is required. When you are ready, migrate to `provideIonicAngular()`, which works in both standalone and NgModule-based apps. Refer to [Migrating from Modules to Standalone](/angular/build-options.mdx#migrating-from-modules-to-standalone).
-#### CSS Imports
+#### CSS Imports {/* #css-imports */}
Remove the `~` prefix from `@ionic/angular` CSS imports. Angular's current build pipeline no longer supports the webpack-loader prefix:
@@ -173,11 +173,11 @@ Remove the `~` prefix from `@ionic/angular` CSS imports. Angular's current build
+ @import '@ionic/angular/css/core.css';
```
-#### Module Resolution
+#### Module Resolution {/* #module-resolution */}
If your app uses TypeScript `moduleResolution: "node"` (classic), imports from subpaths such as `@ionic/angular/lazy` can fail to resolve. Set `moduleResolution` to `"bundler"` in your `tsconfig.json`. Apps created with `ng new` on Angular 17 or later already use this.
-### React
+### React {/* #react */}
1. Ionic 9 supports React 18+. Update to the latest version of React:
@@ -195,7 +195,7 @@ npm install @ionic/react@latest @ionic/react-router@latest
The `@ionic/react` package requires TypeScript 5.4 or later. Its type definitions use `NoInfer`, which TypeScript added in 5.4.
-#### Typed Overlay Hook Props
+#### Typed Overlay Hook Props {/* #typed-overlay-hook-props */}
The `useIonModal` and `useIonPopover` hooks now type `componentProps` against the component they are given, instead of accepting `any`. Passing props that do not match the component is a compile error, and `componentProps` is required when the component declares required props:
@@ -227,7 +227,7 @@ Running the [migration tool](#automated-migration) with `npx @ionic/migrate --ex
Passing a JSX element rather than a component behaves as before: props are bound to the element and `componentProps` is not type checked.
-### React Router
+### React Router {/* #react-router */}
1. Ionic 9 supports React Router 6. Update to version 6 of React Router:
@@ -243,7 +243,7 @@ npm uninstall @types/react-router @types/react-router-dom
Ionic React now requires React Router v6, which has a different API from v5. Below are the key changes you'll need to make.
-#### Route Definition Changes
+#### Route Definition Changes {/* #route-definition-changes */}
The `component` and `render` props have been replaced with the `element` prop, which accepts JSX:
@@ -261,7 +261,7 @@ Routes can no longer render content via nested children. All route content must
+ } />
```
-#### Redirect Changes
+#### Redirect Changes {/* #redirect-changes */}
The `` component has been replaced with ``:
@@ -273,7 +273,7 @@ The `` component has been replaced with ``:
+
```
-#### Nested Route Paths
+#### Nested Route Paths {/* #nested-route-paths */}
Routes that contain nested routes or child `IonRouterOutlet` components need a `/*` suffix to match sub-paths:
@@ -282,7 +282,7 @@ Routes that contain nested routes or child `IonRouterOutlet` components need a `
+ } />
```
-#### Accessing Route Parameters
+#### Accessing Route Parameters {/* #accessing-route-parameters */}
Route parameters are now accessed via the `useParams` hook instead of props:
@@ -296,7 +296,7 @@ Route parameters are now accessed via the `useParams` hook instead of props:
+ const { id } = useParams<{ id: string }>();
```
-#### RouteComponentProps Removed
+#### RouteComponentProps Removed {/* #routecomponentprops-removed */}
The `RouteComponentProps` type and its `history`, `location`, and `match` props are no longer available in React Router v6. Use the equivalent hooks instead:
@@ -325,7 +325,7 @@ The `RouteComponentProps` type and its `history`, `location`, and `match` props
+ console.log(location.pathname);
```
-#### Exact Prop Removed
+#### Exact Prop Removed {/* #exact-prop-removed */}
The `exact` prop is no longer needed. React Router v6 routes match exactly by default. To match sub-paths, use a `/*` suffix on the path:
@@ -334,7 +334,7 @@ The `exact` prop is no longer needed. React Router v6 routes match exactly by de
+
```
-#### Render Prop Removed
+#### Render Prop Removed {/* #render-prop-removed */}
The `render` prop has been replaced with the `element` prop:
@@ -343,7 +343,7 @@ The `render` prop has been replaced with the `element` prop:
+ } />
```
-#### Programmatic Navigation
+#### Programmatic Navigation {/* #programmatic-navigation */}
The `useHistory` hook has been replaced with `useNavigate`:
@@ -366,7 +366,7 @@ The `useHistory` hook has been replaced with `useNavigate`:
+ router.goBack();
```
-#### Custom History Prop Removed
+#### Custom History Prop Removed {/* #custom-history-prop-removed */}
The `history` prop has been removed from `IonReactRouter`, `IonReactHashRouter`, and `IonReactMemoryRouter`. React Router v6 routers no longer accept custom `history` objects.
@@ -386,7 +386,7 @@ For `IonReactMemoryRouter` (commonly used in tests), use `initialEntries` instea
+
```
-#### IonRedirect Removed
+#### IonRedirect Removed {/* #ionredirect-removed */}
The `IonRedirect` component has been removed. Use React Router's `` component instead:
@@ -397,7 +397,7 @@ The `IonRedirect` component has been removed. Use React Router's `` co
+ } />
```
-#### Path Regex Constraints Removed
+#### Path Regex Constraints Removed {/* #path-regex-constraints-removed */}
React Router v6 no longer supports regex constraints in path parameters (e.g., `/:tab(sessions)`). Use literal paths instead:
@@ -408,7 +408,7 @@ React Router v6 no longer supports regex constraints in path parameters (e.g., `
+ } />
```
-#### IonRoute API Changes
+#### IonRoute API Changes {/* #ionroute-api-changes */}
The `IonRoute` component follows the same API changes as React Router's ``. The `render` prop has been replaced with `element`, and the `exact` prop has been removed:
@@ -419,7 +419,7 @@ The `IonRoute` component follows the same API changes as React Router's `
For more information on migrating from React Router v5 to v6, refer to the [React Router v6 Upgrade Guide](https://reactrouter.com/6.28.0/upgrading/v5).
-### Vue
+### Vue {/* #vue */}
1. Ionic 9 supports Vue 3.5+. Update to the latest version of Vue:
@@ -433,7 +433,7 @@ npm install vue@latest
npm install @ionic/vue@latest @ionic/vue-router@latest
```
-### Vue Router
+### Vue Router {/* #vue-router */}
1. Ionic 9 supports Vue Router 5. Update to the latest version of Vue Router:
@@ -445,7 +445,7 @@ npm install vue-router@5
Vue Router v5 is a transition release that ships no runtime breaking changes for Vue Router v4 consumers, so no application code changes are required for routes, navigation guards, or `IonRouterOutlet`.
-#### Deprecation Warning for `next()` in Navigation Guards
+#### Deprecation Warning for `next()` in Navigation Guards {/* #deprecation-warning-for-next-in-navigation-guards */}
Vue Router v5 prints a deprecation warning when `next()` is called inside `beforeRouteLeave`, `beforeRouteEnter`, `beforeRouteUpdate`, or `router.beforeEach`. The callback form still works, but Vue Router v6 will remove it. Migrate to the return-value pattern:
@@ -472,7 +472,7 @@ Vue Router v5 prints a deprecation warning when `next()` is called inside `befor
For more information on migrating from Vue Router v4 to v5, refer to the [Vue Router v4-to-v5 migration guide](https://router.vuejs.org/guide/migration/v4-to-v5.html).
-### Core
+### Core {/* #core */}
1. Update to the latest version of Ionic 9:
@@ -480,7 +480,7 @@ For more information on migrating from Vue Router v4 to v5, refer to the [Vue Ro
npm install @ionic/core@latest
```
-#### Package Exports
+#### Package Exports {/* #package-exports */}
`@ionic/core`'s `package.json` now declares an `exports` field. This fixes subpaths like `@ionic/core/components` and `@ionic/core/loader` failing under Node ESM with `ERR_UNSUPPORTED_DIR_IMPORT`. The strict ESM resolver doesn't read the nested `package.json` files the package previously relied on, and the `exports` field replaces them. This affects toolchains such as Angular 21's default Vitest builder and raw Node.
@@ -497,9 +497,9 @@ The `exports` field defines the supported public entry points, and imports of pa
Apps on `moduleResolution: "node"` (classic) and webpack 4 keep resolving through the legacy fields and need no changes.
-## Required Changes
+## Required Changes {/* #required-changes */}
-### Browser Support
+### Browser Support {/* #browser-support */}
The list of browsers that Ionic supports has changed. Review the [Browser Support Guide](../reference/browser-support) to ensure you are deploying apps to supported browsers.
@@ -514,13 +514,13 @@ Safari >=16
iOS >=16
```
-### Capacitor
+### Capacitor {/* #capacitor */}
Ionic 9 officially supports Capacitor 7 and later. Native platform detection no longer falls back to the Capacitor 2 `isNative` flag; `isCapacitorNative` now relies solely on `Capacitor.isNativePlatform()`, which was added in Capacitor 3.
If your app is still on Capacitor 2, it will no longer be detected as running on a native platform, so `isPlatform('capacitor')`, `isPlatform('hybrid')`, and `getPlatforms()` will report `web` instead of native. Upgrade to Capacitor 7 or later by following the [Capacitor updating guides](https://capacitorjs.com/docs/updating/7-0).
-### Img
+### Img {/* #img */}
`ion-img` is deprecated and will be removed in Ionic 10. The component was created to lazy-load images before browsers supported lazy loading natively. Modern browsers now support the [`loading="lazy"`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/img#loading) attribute on the native `` element, so the component is no longer needed.
@@ -531,7 +531,7 @@ Replace `ion-img` with a native `` tag. Add `loading="lazy"` for lazy loadi
+
```
-#### Events
+#### Events {/* #events */}
The native `` element does not emit Ionic's custom events. Use the standard DOM events instead:
@@ -543,7 +543,7 @@ The native `` element does not emit Ionic's custom events. Use the standard
¹ Native `load` and `error` do not bubble, while the Ionic events did. If you used event delegation (one listener on a parent), listen on each `` instead, or use the capture phase: `parent.addEventListener('load', handler, true)`.
-#### Styling
+#### Styling {/* #styling */}
`ion-img` exposed an `image` CSS shadow part for styling the inner image. With a native ``, style the element directly instead:
@@ -556,7 +556,7 @@ The native `` element does not emit Ionic's custom events. Use the standard
+ }
```
-### Input
+### Input {/* #input */}
#### `autocorrect` Property Type Changed to Boolean {/* #input-autocorrect-property-type-changed-to-boolean */}
@@ -604,7 +604,7 @@ Update your selectors to account for these structural changes:
+ion-input .input-end [slot="end"] { }
```
-### Legacy Picker
+### Legacy Picker {/* #legacy-picker */}
The `ion-picker-legacy` and `ion-picker-legacy-column` components have been removed.
@@ -612,9 +612,9 @@ The `ion-picker-legacy` and `ion-picker-legacy-column` components have been remo
- Remove any usages of `pickerController`. If using React, remove any usages of the `useIonPicker` hook. These controller-based APIs have been removed. Use the [Picker](../api/picker.mdx) component instead.
- Remove any usages of the `PickerOptions`, `PickerButton`, `PickerColumn`, and `PickerColumnOption` type exports. These types were associated with the legacy picker and have been removed.
-### Modal
+### Modal {/* #modal */}
-#### `handleBehavior` Default Changed
+#### `handleBehavior` Default Changed {/* #handlebehavior-default-changed */}
The `handleBehavior` property on `ion-modal` now defaults to `"cycle"` instead of `"none"`. For sheet modals that display a handle, this means the handle is now focusable and activating it (by click, keyboard, or screen reader) cycles the sheet through its available breakpoints. This matches the native iOS sheet behavior and keeps sheet modals operable for assistive technology users by default.
@@ -624,9 +624,9 @@ Sheet modals that relied on the handle being inert should set `handleBehavior="n
```
-### Nav
+### Nav {/* #nav */}
-#### Router Integration Removed
+#### Router Integration Removed {/* #router-integration-removed */}
`ion-nav` no longer integrates with `ion-router`. It is now a standalone imperative stack navigation component, driven only through its own API (`root`, `push`, `pop`, `setRoot`, and so on) and `ion-nav-link`.
@@ -652,11 +652,11 @@ If you relied on `ion-nav` to update the URL, use `ion-router-outlet` for URL-ba
An `ion-nav` can still be nested inside a routed page for local, URL-less stack navigation. It manages its own stack via `root` and `ion-nav-link`, and the URL never changes as you push and pop. For a complete, working example, refer to [Using ion-nav within a Routed Page](../api/router.mdx#using-ion-nav-within-a-routed-page).
-### Router Outlet
+### Router Outlet {/* #router-outlet */}
`ion-router-outlet` now exposes a `swipeGesture` property that controls the swipe-to-go-back gesture per outlet. This property defaults to `true` in `"ios"` mode and `false` in `"md"` mode.
-#### `swipeBackEnabled` Config Behavior Change
+#### `swipeBackEnabled` Config Behavior Change {/* #swipebackenabled-config-behavior-change */}
In React and Vue, the `swipeBackEnabled` config option is now read once when the outlet mounts. Apps that dynamically toggle this config value at runtime should migrate to the `swipeGesture` property instead.
@@ -674,7 +674,7 @@ In React and Vue, the `swipeBackEnabled` config option is now read once when the
+
```
-#### Disabling Swipe-to-Go-Back
+#### Disabling Swipe-to-Go-Back {/* #disabling-swipe-to-go-back */}
To disable the gesture on a specific outlet, set `swipeGesture` to `false`:
@@ -684,7 +684,7 @@ To disable the gesture on a specific outlet, set `swipeGesture` to `false`:
The `swipeBackEnabled` config option is still respected as the initial default and does not need to change for apps that set it once at startup.
-### Searchbar
+### Searchbar {/* #searchbar */}
#### `autocorrect` Property Type Changed to Boolean {/* #searchbar-autocorrect-property-type-changed-to-boolean */}
@@ -693,15 +693,15 @@ The `autocorrect` property on `ion-searchbar` is now a `boolean` (default `false
- Remove the attribute to keep autocorrect disabled (the default).
- Use a property binding to enable it: `[autocorrect]="true"` (Angular), `autocorrect={true}` (React), or `:autocorrect="true"` (Vue).
-### Select
+### Select {/* #select */}
-#### `ionChange` Only Fires When the Value Changes
+#### `ionChange` Only Fires When the Value Changes {/* #ionchange-only-fires-when-the-value-changes */}
The `ionChange` event on `ion-select` now only fires when the selected value actually changes. Previously, the `alert` and `action-sheet` interfaces emitted `ionChange` every time the overlay was confirmed, even when the user chose the option that was already selected. This aligns the `alert` and `action-sheet` interfaces with the existing behavior of the `popover` and `modal` interfaces, and with the documented contract of `ionChange`.
Apps that relied on `ionChange` firing on every confirmation (for example, to detect overlay dismissal without a value change) should listen for `ionDismiss` instead, or use the `didDismiss` event on the underlying alert or action sheet.
-#### Action Sheet Interface `selected` Role Removed
+#### Action Sheet Interface `selected` Role Removed {/* #action-sheet-interface-selected-role-removed */}
When using `interface="action-sheet"`, `ion-select` no longer assigns the `selected` role to the action sheet button for the currently selected option. This aligns the `action-sheet` interface with the `alert`, `popover`, and `modal` interfaces, none of which assign this role. This does not change the selected option's styling.
@@ -743,7 +743,7 @@ If you target `part="label"`, `part="container"`, or `part="icon"`, the part nam
Use the new `part="start"`, `part="control"`, and `part="end"` parts to target the new structural wrappers.
-### Textarea
+### Textarea {/* #textarea */}
#### Floating Label Behavior {/* #textarea-floating-label-behavior */}
@@ -782,7 +782,7 @@ Update your selectors to account for these structural changes:
+ion-textarea .textarea-end [slot="end"] { }
```
-#### Minimum Height Change
+#### Minimum Height Change {/* #minimum-height-change */}
The minimum height of textarea in Material Design (`md` mode) is now `72px`. At the default number of rows this makes textareas the same height regardless of the `fill` property or `labelPlacement`. Previously the minimum height was:
@@ -805,7 +805,7 @@ ion-textarea.custom {
}
```
-## Need Help Upgrading?
+## Need Help Upgrading? {/* #need-help-upgrading */}
Be sure to look at the [Ionic 9 Breaking Changes Guide](https://github.com/ionic-team/ionic-framework/blob/main/BREAKING.md#version-9x) for the complete list of breaking changes. This upgrade guide only covers changes that require action from developers.
diff --git a/versioned_docs/version-v9/utilities/animations.mdx b/versioned_docs/version-v9/utilities/animations.mdx
index 427e7528a3d..1bce09671a6 100644
--- a/versioned_docs/version-v9/utilities/animations.mdx
+++ b/versioned_docs/version-v9/utilities/animations.mdx
@@ -14,7 +14,7 @@ import TabItem from '@theme/TabItem';
/>
-## Overview
+## Overview {/* #overview */}
Ionic Animations is a tool that enables developers to create complex animations in a platform-agnostic manner, without requiring a specific framework or an Ionic app.
@@ -22,7 +22,7 @@ Creating efficient animations can be challenging, as developers are limited by t
Ionic Animations, on the other hand, uses the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API), which offloads all the computation and running of animations to the browser. This approach allows the browser to optimize the animations and ensure their smooth execution. In cases where Web Animations are not supported, Ionic Animations will fall back to [CSS Animations](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Animations/Using_CSS_animations), which should have a negligible difference in performance.
-## Installation
+## Installation {/* #installation */}
````mdx-code-block
````
-## Basic Animations
+## Basic Animations {/* #basic-animations */}
In the example below, an animation that changes the opacity on the `ion-card` element and moves it from left to right along the X axis has been created. This animation will run an infinite number of times, and each iteration of the animation will last 1500ms.
@@ -166,7 +166,7 @@ import Basic from '@site/static/usage/v9/animations/basic/index.mdx';
-## Keyframe Animations
+## Keyframe Animations {/* #keyframe-animations */}
Ionic Animations allows you to control the intermediate steps in an animation using keyframes. Any valid CSS property can be used here, and you can even use CSS Variables as values.
@@ -180,7 +180,7 @@ In the example above, the card element will transition from its initial width, t
Each keyframe object contains an `offset` property. `offset` is a value between 0 and 1 that defines the keyframe step. Offset values must go in ascending order and cannot repeat.
-## Grouped Animations
+## Grouped Animations {/* #grouped-animations */}
Multiple elements can be animated at the same time and controlled via a single parent animation object. Child animations inherit properties such as duration, easing, and iterations unless otherwise specified. A parent animation's `onFinish` callback will not be called until all child animations have completed.
@@ -190,7 +190,7 @@ import Group from '@site/static/usage/v9/animations/group/index.mdx';
-## Before and After Hooks
+## Before and After Hooks {/* #before-and-after-hooks */}
Ionic Animations provides hooks that let you alter an element before an animation runs and after an animation completes. These hooks can be used to perform DOM reads and writes as well as add or remove classes and inline styles.
@@ -202,7 +202,7 @@ import BeforeAndAfterHooks from '@site/static/usage/v9/animations/before-and-aft
-## Chained Animations
+## Chained Animations {/* #chained-animations */}
Animations can be chained to run one after the other. The `play` method returns a Promise that resolves when the animation has completed.
@@ -210,7 +210,7 @@ import Chain from '@site/static/usage/v9/animations/chain/index.mdx';
-## Gesture Animations
+## Gesture Animations {/* #gesture-animations */}
Ionic Animations gives developers the ability to create powerful gesture-based animations by integrating seamlessly with [Ionic Gestures](gestures.mdx).
@@ -220,7 +220,7 @@ import Gesture from '@site/static/usage/v9/animations/gesture/index.mdx';
-## Preference-Based Animations
+## Preference-Based Animations {/* #preference-based-animations */}
Developers can also tailor their animations to user preferences such as `prefers-reduced-motion` and `prefers-color-scheme` using CSS Variables.
@@ -232,17 +232,17 @@ import PreferenceBased from '@site/static/usage/v9/animations/preference-based/i
-## Overriding Ionic Component Animations
+## Overriding Ionic Component Animations {/* #overriding-ionic-component-animations */}
Certain Ionic components allow developers to provide custom animations. All animations are provided as either properties on the component or are set via a global config.
-### Modals
+### Modals {/* #modals */}
import ModalOverride from '@site/static/usage/v9/animations/modal-override/index.mdx';
-## Performance Considerations
+## Performance Considerations {/* #performance-considerations */}
CSS and Web Animations are usually handled on the compositor thread. This is different than the main thread where layout, painting, styling, and your JavaScript is executed. It is recommended that you prefer using properties that can be handled on the compositor thread for optimal animation performance.
@@ -250,7 +250,7 @@ Animating properties such as `height` and `width` cause additional layouts and p
For information on which CSS properties cause layouts or paints to occur, refer to [CSS Triggers](https://csstriggers.com/).
-## Debugging
+## Debugging {/* #debugging */}
For debugging animations in Chrome, there is a great blog post about inspecting animations using the Chrome DevTools: https://developers.google.com/web/tools/chrome-devtools/inspect-styles/animations.
@@ -267,25 +267,25 @@ const animation = createAnimation('my-animation-identifier')
.fromTo('opacity', '1', '0');
```
-## API
+## API {/* #api */}
This section provides a list of all the methods and properties available on the `Animation` class.
-### Interfaces
+### Interfaces {/* #interfaces */}
-#### AnimationDirection
+#### AnimationDirection {/* #animationdirection */}
```tsx
type AnimationDirection = 'normal' | 'reverse' | 'alternate' | 'alternate-reverse';
```
-#### AnimationFill
+#### AnimationFill {/* #animationfill */}
```tsx
type AnimationFill = 'auto' | 'none' | 'forwards' | 'backwards' | 'both';
```
-#### AnimationBuilder
+#### AnimationBuilder {/* #animationbuilder */}
```tsx
type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
@@ -297,7 +297,7 @@ type AnimationBuilder = (baseEl: any, opts?: any) => Animation;
:::
-#### AnimationCallbackOptions
+#### AnimationCallbackOptions {/* #animationcallbackoptions */}
```tsx
interface AnimationCallbackOptions {
@@ -308,7 +308,7 @@ interface AnimationCallbackOptions {
}
```
-#### AnimationPlayOptions
+#### AnimationPlayOptions {/* #animationplayoptions */}
```tsx
interface AnimationPlayOptions {
@@ -321,7 +321,7 @@ interface AnimationPlayOptions {
}
```
-### Properties
+### Properties {/* #properties */}
| Name | Description |
| ------------------------------ | ------------------------------------------------- |
@@ -329,7 +329,7 @@ interface AnimationPlayOptions {
| `elements: HTMLElement[]` | All elements attached to an animation. |
| `parentAnimation?: Animation` | The parent animation of a given animation object. |
-### Methods
+### Methods {/* #methods */}
| Name | Description |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
diff --git a/versioned_docs/version-v9/utilities/gestures.mdx b/versioned_docs/version-v9/utilities/gestures.mdx
index 10ade49d77f..a5955acc66b 100644
--- a/versioned_docs/version-v9/utilities/gestures.mdx
+++ b/versioned_docs/version-v9/utilities/gestures.mdx
@@ -14,13 +14,13 @@ import TabItem from '@theme/TabItem';
/>
-## Overview
+## Overview {/* #overview */}
Ionic Gestures is a utility that allows developers to build custom gestures and interactions for their application in a platform agnostic manner. Developers do not need to be using a particular framework such as React or Angular, nor do they even need to be building an Ionic app! As long as developers have access to v5.0 or greater of Ionic Framework, they will have access to all of Ionic Gestures.
Building complex gestures can be time consuming. Other libraries that provide custom gestures are often times too heavy handed and end up capturing mouse or touch events and not letting them propagate. This can result in other elements no longer being scrollable or clickable.
-## Installation
+## Installation {/* #installation */}
````mdx-code-block
````
-## Basic Gestures
+## Basic Gestures {/* #basic-gestures */}
import Basic from '@site/static/usage/v9/gestures/basic/index.mdx';
@@ -168,7 +168,7 @@ In this example, our app listens for gestures on the `ion-content` element. When
-## Double Click Gesture
+## Double Click Gesture {/* #double-click-gesture */}
import DoubleClick from '@site/static/usage/v9/gestures/double-click/index.mdx';
@@ -176,19 +176,19 @@ In the example below, we want to be able to detect double clicks on an element.
-## Gesture Animations
+## Gesture Animations {/* #gesture-animations */}
See our guide on implementing gesture animations: [Gesture Animations with Ionic Animations](animations.mdx#gesture-animations)
-## Types
+## Types {/* #types */}
| Name | Value |
| ----------------- | -------------------------------------------- |
| `GestureCallback` | `(detail: GestureDetail) => boolean \| void` |
-## Interfaces
+## Interfaces {/* #interfaces */}
-### GestureConfig
+### GestureConfig {/* #gestureconfig */}
| Property | Type | Default | Description |
| --------------- | ------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -208,7 +208,7 @@ See our guide on implementing gesture animations: [Gesture Animations with Ionic
| onEnd | `GestureCallback \| undefined` | `undefined` | A callback that fires when a gesture has ended. This is usually when a pointer has been released. |
| notCaptured | `GestureCallback \| undefined` | `undefined` | A callback that fires when a gesture has not been captured. This usually happens when there is a conflicting gesture with a higher priority. |
-### GestureDetail
+### GestureDetail {/* #gesturedetail */}
| Property | Type | Description |
| -------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -226,12 +226,12 @@ See our guide on implementing gesture animations: [Gesture Animations with Ionic
| event | `UIEvent` | The native event dispatched by the browser. Refer to [UIEvent](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent) for more information. |
| data | `any \| undefined` | Any data specified by the user. This can be set and read in any of the callbacks. |
-## Methods
+## Methods {/* #methods */}
-#### `enable(enable: boolean = true) => void`
+#### `enable(enable: boolean = true) => void` {/* #enableenable-boolean--true--void */}
Enable or disable the gesture.
-#### `destroy() => void`
+#### `destroy() => void` {/* #destroy--void */}
Destroy the gesture instance and stop listening on the target element.
diff --git a/versioned_docs/version-v9/vue/add-to-existing.mdx b/versioned_docs/version-v9/vue/add-to-existing.mdx
index d47b18d21d4..863fdd2358b 100644
--- a/versioned_docs/version-v9/vue/add-to-existing.mdx
+++ b/versioned_docs/version-v9/vue/add-to-existing.mdx
@@ -22,7 +22,7 @@ This guide uses JavaScript examples. If you're using TypeScript, the setup proce
:::
-## Setup
+## Setup {/* #setup */}
:::info
@@ -32,13 +32,13 @@ This guide follows the structure of a Vue app created with `create-vue` (which u
Follow these steps to add Ionic Vue to your existing Vue project:
-#### 1. Install the Packages
+#### 1. Install the Packages {/* #1-install-the-packages */}
```bash
npm install @ionic/vue @ionic/vue-router vue-router
```
-#### 2. Configure Ionic Vue
+#### 2. Configure Ionic Vue {/* #2-configure-ionic-vue */}
Update `src/main.js` to include `IonicVue` and import the required Ionic Framework stylesheets:
@@ -65,7 +65,7 @@ While `core.css` is required, `normalize.css`, `structure.css`, and `typography.
:::
-## Using Individual Components
+## Using Individual Components {/* #using-individual-components */}
After completing the setup above, you can start using Ionic components in your existing Vue app. Here's an example of how to use them:
@@ -84,11 +84,11 @@ import { IonButton, IonDatetime } from '@ionic/vue';
Visit the [components](/components.mdx) page for all of the available Ionic components.
-## Using Ionic Pages
+## Using Ionic Pages {/* #using-ionic-pages */}
If you want to use Ionic pages with full navigation and page transitions, follow these additional setup steps.
-#### 1. Add Additional Ionic Framework Stylesheets
+#### 1. Add Additional Ionic Framework Stylesheets {/* #1-add-additional-ionic-framework-stylesheets */}
Update the imported stylesheets in `src/main.js`:
@@ -112,7 +112,7 @@ import '@ionic/vue/css/display.css';
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 {/* #2-set-up-theming */}
Create a `src/theme/variables.css` file with the following content:
@@ -164,7 +164,7 @@ createApp(App).use(IonicVue).mount('#app');
The `variables.css` file can be used to create custom Ionic Framework themes. The `dark.system.css` import 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 to `theme/variables.css`.
-#### 3. Update the App Component
+#### 3. Update the App Component {/* #3-update-the-app-component */}
Update `src/App.vue` to the following:
@@ -180,7 +180,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/vue';
```
-#### 4. Create a Home Page
+#### 4. Create a Home Page {/* #4-create-a-home-page */}
Create a new file at `src/views/HomePage.vue` with the following:
@@ -248,7 +248,7 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
```
-#### 5. Set up Routing
+#### 5. Set up Routing {/* #5-set-up-routing */}
Add a file at `src/router/index.js` defining the routes:
@@ -324,7 +324,7 @@ router.isReady().then(() => {
You're all set! Your Ionic Vue app is now configured with full Ionic page support. Run `npm run dev` to start your development server and view your app.
-## Next Steps
+## Next Steps {/* #next-steps */}
Now that you have Ionic Vue integrated into your project, check out:
diff --git a/versioned_docs/version-v9/vue/build-options.mdx b/versioned_docs/version-v9/vue/build-options.mdx
index ef4a6eb0189..327936877ed 100644
--- a/versioned_docs/version-v9/vue/build-options.mdx
+++ b/versioned_docs/version-v9/vue/build-options.mdx
@@ -16,9 +16,9 @@ import DocsCards from '@components/global/DocsCards';
Vue gives you several tools to fine tune your application. This guide covers the build options that are most relevant to Ionic Framework.
-## Component Registration Strategies
+## Component Registration Strategies {/* #component-registration-strategies */}
-### Local Component Registration (Recommended)
+### Local Component Registration (Recommended) {/* #local-component-registration-recommended */}
By default, Ionic Framework components are registered locally. With local registration, these components are imported and provided to each Vue component you want to use them in. This is the recommended approach as it allows lazy loading and treeshaking to work properly with Ionic Framework components.
@@ -49,7 +49,7 @@ Note that since we are registering these components locally, neither `IonPage` n
For more information, refer to the [Local Registration Vue Documentation](https://v3.vuejs.org/guide/component-registration.html#local-registration).
-### Global Component Registration
+### Global Component Registration {/* #global-component-registration */}
The other option for registering components is to use global registration. Global registration involves importing the components you want to use in `main.ts` and calling the `component` method on your Vue app instance.
@@ -88,9 +88,9 @@ In the example above, we are using the `IonPage` and `IonContent` components. To
For more information, refer to the [Global Registration Vue Documentation](https://v3.vuejs.org/guide/component-registration.html#global-registration).
-## Build Optimization
+## Build Optimization {/* #build-optimization */}
-### Prefetching Application JavaScript
+### Prefetching Application JavaScript {/* #prefetching-application-javascript */}
By default, the Vue CLI will automatically generate prefetch hints for the JavaScript in your application. Prefetching utilizes the browser idle time to download documents that the user might visit in the near future. When the user visits a page that requires the prefetched document, it can be served quickly from the browser's cache.
diff --git a/versioned_docs/version-v9/vue/lifecycle.mdx b/versioned_docs/version-v9/vue/lifecycle.mdx
index 3b701321eaf..1b84568b3ed 100644
--- a/versioned_docs/version-v9/vue/lifecycle.mdx
+++ b/versioned_docs/version-v9/vue/lifecycle.mdx
@@ -6,7 +6,7 @@ sidebar_label: Lifecycle
This guide discusses how to use the Ionic Framework Lifecycle events in an Ionic Vue application.
-## Ionic Framework Lifecycle Methods
+## Ionic Framework Lifecycle Methods {/* #ionic-framework-lifecycle-methods */}
Ionic Framework provides a few lifecycle methods that you can use in your apps:
@@ -43,7 +43,7 @@ const ionViewWillLeave = () => {
```
-### Composition API Hooks
+### Composition API Hooks {/* #composition-api-hooks */}
These lifecycles can also be expressed using Vue 3's Composition API:
@@ -75,7 +75,7 @@ Pages in your app need to be using the `IonPage` component in order for lifecycl
:::
-## How Ionic Framework Handles the Life of a Page
+## How Ionic Framework Handles the Life of a Page {/* #how-ionic-framework-handles-the-life-of-a-page */}
Ionic Framework has its router outlet, called ``. This outlet extends Vue Router's `` with some additional functionality to enable better experiences for mobile devices.
@@ -90,7 +90,7 @@ Because of this special handling, certain Vue Router components such as ` = [
In our redirect, we look for the index path of our app. Then if we load that, we redirect to the `home` route.
-## Navigating to Different Routes
+## Navigating to Different Routes {/* #navigating-to-different-routes */}
This is all great, but how does one actually navigate to a route? For this, we can use the `router-link` property. Let's create a new routing setup:
@@ -122,7 +122,7 @@ const router = useRouter();
Both options provide the same navigation mechanism, just fitting different use cases.
-### Navigating using `router-link`
+### Navigating using `router-link` {/* #navigating-using-router-link */}
The `router-link` attribute can be set on any Ionic Vue component, and the router will navigate to the route specified when the component is clicked. The `router-link` attribute accepts string values as well as named routes, just like `router.push` from Vue Router. For additional control, the `router-direction` and `router-animation` attributes can be set as well.
@@ -134,7 +134,7 @@ The `router-animation` attribute accepts an `AnimationBuilder` function and is u
Click Me
```
-### Navigating using `useIonRouter`
+### Navigating using `useIonRouter` {/* #navigating-using-useionrouter */}
One downside of using `router-link` is that you cannot run custom code prior to navigating. This makes tasks such as firing off a network request prior to navigation difficult. You could use Vue Router directly, but then you lose the ability to control the page transition. This is where the `useIonRouter` utility is helpful.
@@ -170,7 +170,7 @@ The example above has the app navigate to `/page2` with a custom animation that
Refer to the [useIonRouter documentation](./utility-functions#router) for more details as well as type information.
-### Navigating using `router.go`
+### Navigating using `router.go` {/* #navigating-using-routergo */}
Vue Router has a [router.go](https://router.vuejs.org/api/#go) method that allows developers to move forward or backward through the application history. Let's walk through an example.
@@ -182,7 +182,7 @@ If you were to call `router.go(-2)` on `/pageC`, you would be brought back to `/
A key characteristic of `router.go()` is that it expects your application history to be linear. This means that `router.go()` should not be used in applications that make use of non-linear routing. Refer to [Linear Routing versus Non-Linear Routing](#linear-routing-versus-non-linear-routing) for more information.
-## Lazy Loading Routes
+## Lazy Loading Routes {/* #lazy-loading-routes */}
The current way our routes are setup makes it so they are included in the same initial chunk when loading the app, which is not always ideal. Instead, we can set up our routes so that components are loaded as they are needed:
@@ -207,9 +207,9 @@ const routes: Array = [
Here, we have the same setup as before only this time `DetailPage` has been replaced with an import call. This will result in the `DetailPage` component no longer being part of the chunk that is requested on application load.
-## Linear Routing versus Non-Linear Routing
+## Linear Routing versus Non-Linear Routing {/* #linear-routing-versus-non-linear-routing */}
-### Linear Routing
+### Linear Routing {/* #linear-routing */}
If you have built a web app that uses routing, you likely have used linear routing before. Linear routing means that you can move forward or backward through the application history by pushing and popping pages.
@@ -233,7 +233,7 @@ When we press the back button, we follow that same routing path except in revers
The downside of linear routing is that it does not allow for complex user experiences such as tab views. This is where non-linear routing comes into play.
-### Non-Linear Routing
+### Non-Linear Routing {/* #non-linear-routing */}
Non-linear routing is a concept that may be new to many web developers learning to build mobile apps with Ionic.
@@ -261,7 +261,7 @@ If tapping the back button simply called `router.go(-1)` from the `Ted Lasso` vi
Non-linear routing allows for sophisticated user flows that linear routing cannot handle. However, certain linear routing APIs such as `router.go()` cannot be used in this non-linear environment. This means that `router.go()` should not be used when using tabs or nested outlets.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose */}
We recommend keeping your application as simple as possible until you need to add non-linear routing. Non-linear routing is very powerful, but it also adds a considerable amount of complexity to mobile applications.
@@ -271,11 +271,11 @@ For more on tabs, please refer to [Working with Tabs](#working-with-tabs).
For more on nested router outlets, please refer to [Nested Routes](#nested-routes).
-## Shared URLs versus Nested Routes
+## Shared URLs versus Nested Routes {/* #shared-urls-versus-nested-routes */}
A common point of confusion when setting up routing is deciding between shared URLs or nested routes. This part of the guide will explain both and help you decide which one to use.
-### Shared URLs
+### Shared URLs {/* #shared-urls */}
Shared URLs is a route configuration where routes have pieces of the URL in common. The following is an example of a shared URL configuration:
@@ -294,7 +294,7 @@ const routes: Array = [
The above routes are considered "shared" because they reuse the `dashboard` piece of the URL.
-### Nested Routes
+### Nested Routes {/* #nested-routes */}
Nested Routes is a route configuration where routes are listed as children of other routes. The following is an example of a nested route configuration:
@@ -319,7 +319,7 @@ const routes: Array = [
The above routes are nested because they are in the `children` array of the parent route. Notice that the parent route renders the `DashboardRouterOutlet` component. When you nest routes, you need to render another instance of `ion-router-outlet`.
-### Which one should I choose?
+### Which one should I choose? {/* #which-one-should-i-choose-1 */}
Shared URLs are great when you want to transition from page A to page B while preserving the relationship between the two pages in the URL. In our previous example, a button on the `/dashboard` page could transition to the `/dashboard/stats` page. The relationship between the two pages is preserved because of a) the page transition and b) the url.
@@ -327,7 +327,7 @@ Nested routes should be used when you want to render content in outlet A while a
There are very few use cases in which nested routes make sense in mobile applications. When in doubt, use the shared URL route configuration. We strongly caution against using nested routing in contexts other than tabs as it can quickly make navigating your app confusing.
-## Working with Tabs
+## Working with Tabs {/* #working-with-tabs */}
When working with tabs, Ionic Vue needs a way to know which view belongs to which tab. The `IonTabs` component comes in handy here, but let's examine the routing setup for this:
@@ -399,7 +399,7 @@ import { ellipse, square, triangle } from 'ionicons/icons';
If you have worked with Ionic Framework before, this should feel familiar. We create an `ion-tabs` component and provide an `ion-tab-bar`. The `ion-tab-bar` provides `ion-tab-button` components, each with a `tab` property that is associated with its corresponding tab in the router config. We also provide an `ion-router-outlet` to give `ion-tabs` an outlet to render the different tab views in.
-### How Tabs in Ionic Work
+### How Tabs in Ionic Work {/* #how-tabs-in-ionic-work */}
Each tab in Ionic is treated as an individual navigation stack. This means if you have three tabs in your application, each tab has its own navigation stack. Within each stack you can navigate forwards (push a view) and backwards (pop a view).
@@ -407,7 +407,7 @@ This behavior is important to note as it is different than most tab implementati
Since Ionic is focused on helping developers build mobile apps, the tabs in Ionic are designed to match native mobile tabs as closely as possible. As a result, there may be certain behaviors in Ionic's tabs that differ from tabs implementations in other UI libraries. Read on to learn more about some of these differences.
-### Child Routes within Tabs
+### Child Routes within Tabs {/* #child-routes-within-tabs */}
When adding additional routes to tabs you should write them as sibling routes with the parent tab as the path prefix. The example below defines the `/tabs/tab1/view` route as a sibling of the `/tabs/tab1` route. Since this new route has the `tab1` prefix, it will be rendered inside of the `Tabs` component, and Tab 1 will still be selected in the `ion-tab-bar`.
@@ -446,7 +446,7 @@ const routes: Array = [
];
```
-### Switching Between Tabs
+### Switching Between Tabs {/* #switching-between-tabs */}
Since each tab is its own navigation stack, it is important to note that these navigation stacks should never interact. This means that there should never be a button in Tab 1 that routes a user to Tab 2. In other words, tabs should only be changed by the user tapping a tab button in the tab bar.
@@ -484,15 +484,15 @@ The example below shows how the Spotify app reuses the same album component to s
| :-------------------------------------------------: | :---------------------------------------------------: |
| | |
-## Components
+## Components {/* #components */}
-### IonRouterOutlet
+### IonRouterOutlet {/* #ionrouteroutlet */}
The `IonRouterOutlet` component provides a container to render your views in. It is similar to the `RouterView` component found in other Vue applications except that `IonRouterOutlet` can render multiple pages in the DOM in the same outlet. When a component is rendered in `IonRouterOutlet` we consider this to be an Ionic Framework "page". The router outlet container controls the transition animation between the pages as well as controls when a page is created and destroyed. This helps maintain the state between the views when switching back and forth between them.
Nothing should be provided inside of `IonRouterOutlet` when setting it up in your template. While `IonRouterOutlet` can be nested in child components, we caution against it as it typically makes navigation in apps confusing. Refer to [Shared URLs versus Nested Routes](#shared-urls-versus-nested-routes) for more information.
-### IonPage
+### IonPage {/* #ionpage */}
The `IonPage` component wraps each view in an Ionic Vue app and allows page transitions and stack navigation to work properly. Each view that is navigated to using the router must include an `IonPage` component.
@@ -517,9 +517,9 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
Components presented via `IonModal` or `IonPopover` do not typically need an `IonPage` component unless you need a wrapper element. In that case, we recommend using `IonPage` so that the component dimensions are still computed properly.
-## Functions
+## Functions {/* #functions */}
-### useIonRouter
+### useIonRouter {/* #useionrouter */}
▸ **useIonRouter**(): [`UseIonRouterResult`](utility-functions#useionrouterresult)
@@ -527,7 +527,7 @@ Returns the Ionic router instance, containing API methods for navigating, custom
For example usages, please refer to our [Utility Functions](utility-functions#useionrouter).
-## URL Parameters
+## URL Parameters {/* #url-parameters */}
Let's expand upon our original routing example to show how we can use URL parameters. We recommend [passing URL parameters as props](https://router.vuejs.org/guide/essentials/passing-props.html) so that the component does not need a direct reference to the router, which makes it easier to reuse and test in isolation.
@@ -577,7 +577,7 @@ defineProps<{ id: string }>();
The `id` parameter from the URL is received as a prop and rendered on the screen. The component has no dependency on the router itself.
-## Router History
+## Router History {/* #router-history */}
Vue Router ships with a configurable history mode. Let's go over the different options and why you might want to use each one.
@@ -587,6 +587,6 @@ Vue Router ships with a configurable history mode. Let's go over the different o
- `createMemoryHistory`: This option creates an in-memory based history. This is mainly used to handle server-side rendering (SSR).
-## More Information
+## More Information {/* #more-information */}
For more info on routing in Vue using Vue Router, check out the [Vue Router documentation](https://router.vuejs.org/).
diff --git a/versioned_docs/version-v9/vue/overview.mdx b/versioned_docs/version-v9/vue/overview.mdx
index 06bbb5624a2..f04a8cb4128 100644
--- a/versioned_docs/version-v9/vue/overview.mdx
+++ b/versioned_docs/version-v9/vue/overview.mdx
@@ -16,21 +16,21 @@ import DocsCards from '@components/global/DocsCards';
`@ionic/vue` brings the full power of the Ionic Framework to Vue developers. It offers seamless integration with the Vue ecosystem, so you can build high-quality cross-platform apps using familiar Vue tools, components, and best practices. You also get access to Ionic's extensive UI library and native capabilities.
-## Vue Version Support
+## Vue Version Support {/* #vue-version-support */}
Ionic Vue v9 supports Vue 3.5 and later. For detailed information on supported versions and our support policy, refer to the [Ionic Vue Support Policy](/reference/support.mdx#ionic-vue).
-## Vue Tooling
+## Vue Tooling {/* #vue-tooling */}
Ionic Vue projects use the same tooling as standard Vue CLI projects, so you can take advantage of the full Vue CLI feature set for building, testing, and deploying your apps. Starter projects come with useful features enabled by default, such as Vue Router for navigation and TypeScript support for type safety and improved developer experience.
-## Native Tooling
+## Native Tooling {/* #native-tooling */}
[Capacitor](https://capacitorjs.com) is the official cross-platform runtime for Ionic Vue, enabling your apps to run natively on iOS, Android, and the web with a single codebase.
While you can use many [Cordova](https://cordova.apache.org/) plugins with Ionic Vue, Capacitor is the recommended and fully supported solution. The [Ionic CLI](../cli.mdx) does not provide official Cordova integration for Ionic Vue projects. For more information on using Cordova plugins with Capacitor, refer to the [Capacitor documentation](https://capacitorjs.com/docs/cordova).
-## Installation
+## Installation {/* #installation */}
```shell-session
$ npm install -g @ionic/cli
@@ -40,7 +40,7 @@ $ cd myApp
$ ionic serve █
```
-## Resources
+## Resources {/* #resources */}
diff --git a/versioned_docs/version-v9/vue/performance.mdx b/versioned_docs/version-v9/vue/performance.mdx
index ecbc7344244..1fd79c268eb 100644
--- a/versioned_docs/version-v9/vue/performance.mdx
+++ b/versioned_docs/version-v9/vue/performance.mdx
@@ -5,7 +5,7 @@ sidebar_label: Performance
# Vue Performance
-## v-for with Ionic Components
+## v-for with Ionic Components {/* #v-for-with-ionic-components */}
When using `v-for` with Ionic components, we recommend using Vue's `key` attribute. This allows Vue to re-render loop elements in an efficient way by only updating the content inside of the component rather than re-creating the component altogether.
diff --git a/versioned_docs/version-v9/vue/platform.mdx b/versioned_docs/version-v9/vue/platform.mdx
index d1fc625812c..0b401cbce84 100644
--- a/versioned_docs/version-v9/vue/platform.mdx
+++ b/versioned_docs/version-v9/vue/platform.mdx
@@ -5,7 +5,7 @@ sidebar_label: Platform
# Platform
-## isPlatform
+## isPlatform {/* #isplatform */}
The `isPlatform` method can be used to test if your app is running on a certain platform:
@@ -17,7 +17,7 @@ isPlatform('ios'); // returns true when running on a iOS device
Depending on the platform the user is on, isPlatform(platformName) will return true or false. Note that the same app can return true for more than one platform name. For example, an app running from an iPad would return true for the platform names: mobile, ios, ipad, and tablet. Additionally, if the app was running from Cordova then cordova would be true.
-## getPlatforms
+## getPlatforms {/* #getplatforms */}
The `getPlatforms` method can be used to determine which platforms your app is currently running on.
@@ -29,7 +29,7 @@ getPlatforms(); // returns ["iphone", "ios", "mobile", "mobileweb"] from an iPho
Depending on what device you are on, `getPlatforms` can return multiple values. Each possible value is a hierarchy of platforms. For example, on an iPhone, it would return mobile, ios, and iphone.
-## Platforms
+## Platforms {/* #platforms */}
Below is a table listing all the possible platform values along with corresponding descriptions.
@@ -50,7 +50,7 @@ Below is a table listing all the possible platform values along with correspondi
| pwa | a PWA app |
| tablet | a tablet device |
-## Customizing Platform Detection Functions
+## 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.
diff --git a/versioned_docs/version-v9/vue/pwa.mdx b/versioned_docs/version-v9/vue/pwa.mdx
index 5f82dc39ebf..777f79d8f9d 100644
--- a/versioned_docs/version-v9/vue/pwa.mdx
+++ b/versioned_docs/version-v9/vue/pwa.mdx
@@ -11,7 +11,7 @@ sidebar_label: Progressive Web Apps
/>
-## Making your Vue app a PWA with Vite
+## Making your Vue app a PWA with Vite {/* #making-your-vue-app-a-pwa-with-vite */}
The two main requirements of a PWA are a [Service Worker](https://developers.google.com/web/fundamentals/primers/service-workers/) and a [Web Application Manifest](https://developers.google.com/web/fundamentals/web-app-manifest/). While it's possible to add both of these to an app manually, we recommend using the [Vite PWA Plugin](https://vite-pwa-org.netlify.app/) instead.
@@ -39,7 +39,7 @@ For more information on configuring the Vite PWA Plugin, refer to the [Vite PWA
Refer to the [Vite PWA "Deploy" Guide](https://vite-pwa-org.netlify.app/deployment/) for information on how to deploy your PWA.
-## Making your Vue app a PWA with Vue CLI
+## Making your Vue app a PWA with Vue CLI {/* #making-your-vue-app-a-pwa-with-vue-cli */}
:::note
@@ -111,7 +111,7 @@ The service worker that is generated is based on [Workbox's webpack plugin](http
If you want to configure this and change the default behavior, checkout the [PWA plugin docs](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa#configuration) on GitHub.
-### Manifest
+### Manifest {/* #manifest */}
In addition to the service worker, the Vue PWA plugin also is responsible for creating a manifest file for your app as well. By default, the CLI will generate a manifest that contains the following entries.
@@ -152,11 +152,11 @@ In addition to the service worker, the Vue PWA plugin also is responsible for cr
Be sure to update the icons in `public/img/icons` to match your own brand. If you wanted to customize the theme color or name, be sure to read the [PWA plugin docs](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa#configuration) on GitHub.
-### Deploying
+### Deploying {/* #deploying */}
You can use various hosts like Firebase, Vercel, Netlify, or even Azure Static Web Apps. All will have similar setup processes that need to be completed. For this guide, Firebase will be used as the hosting example. In addition to this guide, the [Vue CLI docs](https://cli.vuejs.org/guide/deployment.html) also have a guide on how to deploy to various providers.
-#### Firebase
+#### Firebase {/* #firebase */}
Firebase hosting provides many benefits for Progressive Web Apps, including fast response times thanks to CDNs, HTTPS enabled by default, and support for [HTTP2 push](https://firebase.googleblog.com/2016/09/http2-comes-to-firebase-hosting.html).
diff --git a/versioned_docs/version-v9/vue/quickstart.mdx b/versioned_docs/version-v9/vue/quickstart.mdx
index 662f393d582..9be48c4edb8 100644
--- a/versioned_docs/version-v9/vue/quickstart.mdx
+++ b/versioned_docs/version-v9/vue/quickstart.mdx
@@ -18,7 +18,7 @@ Welcome! This guide will walk you through the basics of Ionic Vue development. Y
If you're looking for a high-level overview of what Ionic Vue is and how it fits into the Vue ecosystem, refer to the [Ionic Vue Overview](overview).
-## Prerequisites
+## Prerequisites {/* #prerequisites */}
Before you begin, make sure you have Node.js and npm installed on your machine.
You can check by running:
@@ -30,7 +30,7 @@ npm -v
If you don't have Node.js and npm, [download Node.js](https://nodejs.org/en/download) (which includes npm).
-## Create a Project with the Ionic CLI
+## Create a Project with the Ionic CLI {/* #create-a-project-with-the-ionic-cli */}
First, install the latest [Ionic CLI](../cli):
@@ -51,7 +51,7 @@ After running `ionic serve`, your project will open in the browser.

-## Explore the Project Structure
+## Explore the Project Structure {/* #explore-the-project-structure */}
Your new app's directory will look like this:
@@ -73,7 +73,7 @@ All file paths in the examples below are relative to the project root directory.
Let's walk through these files to understand the app's structure.
-## View the App Component
+## View the App Component {/* #view-the-app-component */}
The root of your app is defined in `App.vue`:
@@ -91,7 +91,7 @@ import { IonApp, IonRouterOutlet } from '@ionic/vue';
This sets up the root of your application, using Ionic's `ion-app` and `ion-router-outlet` components. The router outlet is where your pages will be displayed.
-## View Routes
+## View Routes {/* #view-routes */}
Routes are defined in `router/index.ts`:
@@ -122,7 +122,7 @@ export default router;
When you visit the root URL (`/`), the `HomePage` component will be loaded.
-## View the Home Page
+## View the Home Page {/* #view-the-home-page */}
The Home page component, defined in `HomePage.vue`, imports the Ionic components and defines the page template:
@@ -170,7 +170,7 @@ For detailed information about Ionic layout components, refer to the [Header](/a
:::
-## Add an Ionic Component
+## 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`:
@@ -190,7 +190,7 @@ import { IonButton, IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from
```
-## Add a New Page
+## Add a New Page {/* #add-a-new-page */}
Create a new page at `NewPage.vue`:
@@ -229,7 +229,7 @@ When creating your own pages, always use `ion-page` as the root component. This
:::
-## Navigate to the New Page
+## Navigate to the New Page {/* #navigate-to-the-new-page */}
To navigate to the new page, create a route for it by first importing it at the top of `router/index.ts` after the `HomePage` import:
@@ -270,7 +270,7 @@ Navigating can also be performed programmatically using Vue Router, and routes c
:::
-## Add Icons to the New Page
+## Add Icons to the New Page {/* #add-icons-to-the-new-page */}
Ionic Vue comes with [Ionicons](https://ionic.io/ionicons/) pre-installed. You can use any icon by setting the `icon` property of the `ion-icon` component.
@@ -294,7 +294,7 @@ Note that we are passing the imported SVG reference, **not** the icon name as a
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 {/* #call-component-methods */}
Let's add a button that can scroll the content area to the bottom.
@@ -349,7 +349,7 @@ This pattern is necessary because Ionic components are built as Web Components.
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 {/* #run-on-a-device */}
Ionic's components work everywhere: on iOS, Android, and PWAs. To deploy to mobile, use [Capacitor](https://capacitorjs.com):
@@ -368,7 +368,7 @@ ionic cap open android
Refer to [Capacitor's Getting Started guide](https://capacitorjs.com/docs/getting-started/with-ionic) for more.
-## Build with TypeScript or JavaScript
+## Build with TypeScript or JavaScript {/* #build-with-typescript-or-javascript */}
Ionic Vue projects are created with TypeScript by default, but you can easily convert to JavaScript if you prefer. After generating a blank Ionic Vue app, follow these steps:
@@ -394,7 +394,7 @@ npm uninstall --save typescript @types/jest @typescript-eslint/eslint-plugin @ty
9. Install terser `npm i -D terser`.
-## Explore More
+## Explore More {/* #explore-more */}
This guide covered the basics of creating an Ionic Vue app, adding navigation, and introducing Capacitor for native builds. To dive deeper, check out:
diff --git a/versioned_docs/version-v9/vue/slides.mdx b/versioned_docs/version-v9/vue/slides.mdx
index 926a2f1215b..d1f46dc27ed 100644
--- a/versioned_docs/version-v9/vue/slides.mdx
+++ b/versioned_docs/version-v9/vue/slides.mdx
@@ -26,7 +26,7 @@ Using Swiper's Vue component is **not** required to use Swiper.js with Ionic Fra
:::
-## Getting Started
+## Getting Started {/* #getting-started */}
First, update to the latest version of Ionic:
@@ -46,7 +46,7 @@ Once that is done, install the Swiper dependency in your project:
npm install swiper@latest
```
-## Swiping with Style
+## Swiping with Style {/* #swiping-with-style */}
Next, we need to import the base Swiper styles. We are also going to import the styles that Ionic provides which will let us customize the Swiper styles using the same CSS Variables that we used with `ion-slides`.
@@ -65,7 +65,7 @@ Importing `@ionic/vue/css/ionic-swiper.css` is **not** required to use Swiper.js
:::
-### Updating Selectors
+### Updating Selectors {/* #updating-selectors */}
Previously, we were able to target `ion-slides` and `ion-slide` to apply any custom styling. The contents of those style blocks remain the same, but we need to update the selectors. Below is a list of selector changes when going from `ion-slides` to Swiper Vue:
@@ -74,7 +74,7 @@ Previously, we were able to target `ion-slides` and `ion-slide` to apply any cus
| `ion-slides` | `.swiper` |
| `ion-slide` | `.swiper-slide` |
-### Pre-processors (optional)
+### Pre-processors (optional) {/* #pre-processors-optional */}
For developers using SCSS or Less styles, Swiper also provides imports for those files.
@@ -92,7 +92,7 @@ import 'swiper/scss';
import '@ionic/vue/css/ionic-swiper.css';
```
-## Using Components
+## Using Components {/* #using-components */}
Swiper exports two components: `Swiper` and `SwiperSlide`. The `Swiper` component is the equivalent of `IonSlides`, and `SwiperSlide` is the equivalent of `IonSlide`.
@@ -120,7 +120,7 @@ import '@ionic/vue/css/ionic-swiper.css';
```
-## Using Modules
+## Using Modules {/* #using-modules */}
By default, Swiper for Vue does not import any additional modules. To use modules such as Navigation or Pagination, you need to import them first.
@@ -223,7 +223,7 @@ Refer to [Swiper's Vue usage documentation](https://swiperjs.com/vue#usage) for
:::
-## The IonicSlides Module
+## The IonicSlides Module {/* #the-ionicslides-module */}
With `ion-slides`, Ionic automatically customized dozens of Swiper properties. This resulted in an experience that felt smooth when swiping on mobile devices. We recommend using the `IonicSlides` module to ensure that these properties are also set when using Swiper directly. However, using this module is **not** required to use Swiper.js in Ionic.
@@ -266,7 +266,7 @@ The `IonicSlides` module must be the last module in the array. This will let it
:::
-## Properties
+## Properties {/* #properties */}
Swiper options are provided as props directly on the `` component rather than via the `options` object in `ion-slides`.
@@ -309,7 +309,7 @@ All properties available in Swiper Vue can be found in the [Swiper Vue props doc
:::
-## Events
+## Events {/* #events */}
Since the `Swiper` component is not provided by Ionic Framework, event names will not have an `ionSlide` prefix to them.
@@ -364,7 +364,7 @@ All events available in Swiper Vue can be found in the [Swiper Vue events docume
:::
-## Methods
+## Methods {/* #methods */}
Most methods have been removed in favor of accessing the `` props directly. Additionally, you no longer need to access `$el` first when calling methods.
@@ -403,7 +403,7 @@ Below is a full list of method changes when going from `ion-slides` to Swiper Vu
| `startAutoplay()` | Use the `autoplay` property instead. |
| `stopAutoplay()` | Use the `autoplay` property instead. |
-## Effects
+## Effects {/* #effects */}
If you are using effects such as Cube or Fade, you can install them just like we did with the other modules. In this example, we will use the fade effect. To start, we will import `EffectFade` from `swiper` and provide it in the `modules` array:
@@ -491,21 +491,21 @@ For more information on effects in Swiper, please refer to the [Swiper Vue effec
:::
-## Wrap Up
+## Wrap Up {/* #wrap-up */}
Now that you have Swiper installed, there is a whole set of new Swiper features for you to enjoy. We recommend starting with the [Swiper Vue Introduction](https://swiperjs.com/vue) and then referencing [the Swiper API docs](https://swiperjs.com/swiper-api).
-## FAQ
+## FAQ {/* #faq */}
-### Where can I find an example of this migration?
+### Where can I find an example of this migration? {/* #where-can-i-find-an-example-of-this-migration */}
You can find a sample app with `ion-slides` and the equivalent Swiper usage at https://github.com/ionic-team/slides-migration-samples.
-### Where can I get help with this migration?
+### Where can I get help with this migration? {/* #where-can-i-get-help-with-this-migration */}
If you are running into issues with the migration, please create a post on the [Ionic Forum](https://forum.ionicframework.com/).
-### Where do I file bug reports?
+### Where do I file bug reports? {/* #where-do-i-file-bug-reports */}
Before opening an issue, please consider creating a post on the [Swiper Discussion Board](https://github.com/nolimits4web/swiper/discussions) or the [Ionic Forum](https://forum.ionicframework.com) to check if your issue can be resolved by the community.
diff --git a/versioned_docs/version-v9/vue/storage.mdx b/versioned_docs/version-v9/vue/storage.mdx
index 5a0b18e959f..f75fade9a1a 100644
--- a/versioned_docs/version-v9/vue/storage.mdx
+++ b/versioned_docs/version-v9/vue/storage.mdx
@@ -21,18 +21,18 @@ Some storage options involve third-party plugins or products. In such cases, we
Here are some common use cases and solutions:
-## Local Application Settings and Data
+## Local Application Settings and Data {/* #local-application-settings-and-data */}
Many applications need to locally store settings as well as other lightweight key/value data. The [Capacitor Preferences](https://capacitorjs.com/docs/apis/preferences) plugin is specifically designed to handle these scenarios.
-## Relational Data Storage (Mobile Only)
+## Relational Data Storage (Mobile Only) {/* #relational-data-storage-mobile-only */}
Some applications, especially those following an offline-first methodology, may require locally storing high volumes of complex relational data. For such scenarios, a SQLite plugin may be used. The most common SQLite plugin offerings are:
- [Cordova SQLite Storage](https://github.com/storesafe/cordova-sqlite-storage) (a [convenience wrapper](https://danielsogl.gitbook.io/awesome-cordova-plugins/sqlite) also exists for this plugin to aid in implementation)
- [Capacitor Community SQLite Plugin](https://github.com/capacitor-community/sqlite)
-## Non-Relational High Volume Data Storage (Mobile and Web)
+## Non-Relational High Volume Data Storage (Mobile and Web) {/* #non-relational-high-volume-data-storage-mobile-and-web */}
For applications that need to store a high volume of data as well as operate on both web and mobile, a potential solution is to create a key/value pair data storage service that uses [indexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) on the web and one of the previously mentioned SQLite plugins on mobile.
@@ -42,7 +42,7 @@ Here a sample of how this can be accomplished:
- [Mobile Service](https://github.com/ionic-enterprise/tutorials-and-demos-vue/blob/main/demos/sqlcipher-kv-pair/src/composables/mobile-kv-store.ts)
- [Web Service](https://github.com/ionic-enterprise/tutorials-and-demos-vue/blob/main/demos/sqlcipher-kv-pair/src/composables/web-kv-store.ts)
-## Other Options
+## Other Options {/* #other-options */}
Other storage options that provide local as well as cloud-based storage that work well within Capacitor applications also exist and may integrate well with your application.
diff --git a/versioned_docs/version-v9/vue/testing.mdx b/versioned_docs/version-v9/vue/testing.mdx
index f285dce7218..25e870fc28e 100644
--- a/versioned_docs/version-v9/vue/testing.mdx
+++ b/versioned_docs/version-v9/vue/testing.mdx
@@ -12,9 +12,9 @@ title: Testing
This document provides an overview of how to test an application built with `@ionic/vue`. Applications generated with the Ionic CLI are set up for unit testing with [Vitest](https://vitest.dev) and [Vue Test Utils](https://test-utils.vuejs.org), and for end-to-end testing with [Cypress](https://www.cypress.io).
-## Unit Testing
+## Unit Testing {/* #unit-testing */}
-### Waiting for Components
+### Waiting for Components {/* #waiting-for-components */}
When you need to wait for an Ionic component to render before asserting against its DOM, use the `componentOnReady` helper exported from `@ionic/core`. Do not call `el.componentOnReady()` directly. `@ionic/vue` uses Stencil's custom elements build, where that method does not exist on the element. The helper waits one animation frame instead, giving the component's inner contents a chance to render.
diff --git a/versioned_docs/version-v9/vue/troubleshooting.mdx b/versioned_docs/version-v9/vue/troubleshooting.mdx
index 9e38bc58bb3..cfd789eb781 100644
--- a/versioned_docs/version-v9/vue/troubleshooting.mdx
+++ b/versioned_docs/version-v9/vue/troubleshooting.mdx
@@ -14,7 +14,7 @@ This guide covers some of the more common issues you may run into when developin
Have an issue that you think should be covered here? [Let us know!](https://github.com/ionic-team/ionic-docs/issues/new?assignees=&labels=content&template=content-issue.md&title=)
-## Failed to resolve component
+## Failed to resolve component {/* #failed-to-resolve-component */}
```shell
[Vue warn]: Failed to resolve component: ion-button
@@ -38,7 +38,7 @@ import { IonButton } from '@ionic/vue';
Prefer to register your components globally once? We have you covered. Our [Build Options Guide](/vue/build-options.mdx#global-component-registration) shows you how to register Ionic Vue components globally as well as the potential downsides to be aware of when using this approach.
-## Slot attributes are deprecated
+## Slot attributes are deprecated {/* #slot-attributes-are-deprecated */}
```shell
`slot` attributes are deprecated vue/no-deprecated-slot-attribute
@@ -60,7 +60,7 @@ If you are using VSCode and have the Vetur plugin installed, you are likely gett
To resolve this issue, you will need to turn off Vetur's template validation with `vetur.validation.template: false`. Refer to the [Vetur Linting Guide](https://vuejs.github.io/vetur/guide/linting-error.html#linting) for more information.
-## Method on component is not a function
+## Method on component is not a function {/* #method-on-component-is-not-a-function */}
In order to access a method on an Ionic Framework component in Vue, you will need to access the underlying Web Component instance first:
@@ -76,7 +76,7 @@ In other framework integrations such as Ionic React, this is not needed as any `
Refer to the [Quickstart Guide](/vue/quickstart.mdx#call-component-methods) for more information.
-## Page transitions are not working
+## Page transitions are not working {/* #page-transitions-are-not-working */}
In order for page transitions to work correctly, each page must have an `ion-page` component at the root:
@@ -99,7 +99,7 @@ import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/vue
Refer to the [IonPage documentation](navigation.mdx#ionpage) for more information.
-## Ionic events bound in JavaScript are not firing
+## Ionic events bound in JavaScript are not firing {/* #ionic-events-bound-in-javascript-are-not-firing */}
When creating event listeners in JavaScript (i.e. `addEventListener`), event names should be written as kebab-case:
@@ -117,7 +117,7 @@ await modal.present();
This is done to align with how developers bind events in their Vue templates by using kebab-case: https://vuejs.org/guide/essentials/component-basics.html#case-insensitivity
-## Blank white screen in Capacitor native build
+## Blank white screen in Capacitor native build {/* #blank-white-screen-in-capacitor-native-build */}
If your app runs correctly in the browser but shows a blank white screen when launched in a Capacitor iOS or Android build, the most common cause is a non-default `base` in `vite.config.js` (or `publicPath` in `vue.config.js` for legacy Vue CLI projects).
diff --git a/versioned_docs/version-v9/vue/utility-functions.mdx b/versioned_docs/version-v9/vue/utility-functions.mdx
index 60004dfd999..6993064013d 100644
--- a/versioned_docs/version-v9/vue/utility-functions.mdx
+++ b/versioned_docs/version-v9/vue/utility-functions.mdx
@@ -13,17 +13,17 @@ sidebar_label: Utility Functions
Ionic Vue ships with several utility functions that you can use in your application to make certain tasks easier such as managing the on-screen keyboard and the hardware back button.
-## Router
+## Router {/* #router */}
-### Functions
+### Functions {/* #functions */}
-#### useIonRouter
+#### useIonRouter {/* #useionrouter */}
▸ **useIonRouter**(): [`UseIonRouterResult`](#useionrouterresult)
Returns the Ionic router instance, containing API methods for navigating, customizing page transitions and routing context for native features. This function can be used in combination with the [`useRouter`](https://router.vuejs.org/api/index.html#userouter) from Vue.
-##### Customizing Page Transitions
+##### Customizing Page Transitions {/* #customizing-page-transitions */}
```js
import { IonPage, useIonRouter } from '@ionic/vue';
@@ -38,7 +38,7 @@ const back = () => {
};
```
-##### Back Navigation
+##### Back Navigation {/* #back-navigation */}
You may want to know if you are at the root page of the application when a user presses the hardware back button on Android.
@@ -53,9 +53,9 @@ if (ionRouter.canGoBack()) {
For additional APIs with Vue routing, please refer to the [Vue Router documentation](https://router.vuejs.org/api/index.html).
-### Interfaces
+### Interfaces {/* #interfaces */}
-#### UseIonRouterResult
+#### UseIonRouterResult {/* #useionrouterresult */}
```ts
import { AnimationBuilder } from '@ionic/vue';
@@ -84,7 +84,7 @@ useIonRouter(): UseIonRouterResult;
Refer to the [Vue Navigation Documentation](./navigation#navigating-using-useionrouter) for more usage examples.
-## Hardware Back Button
+## Hardware Back Button {/* #hardware-back-button */}
The `useBackButton` function can be used to register a callback function to fire whenever the hardware back button on Android is pressed. Additionally it accepts a priority parameter, allowing developers to customize which handler fires first if multiple handlers are registered.
@@ -98,7 +98,7 @@ useBackButton(10, () => {
});
```
-### Interfaces
+### Interfaces {/* #interfaces-1 */}
```ts
type Handler = (processNextHandler: () => void) => Promise | void | null;
@@ -117,7 +117,7 @@ The `useBackButton` callback will only fire when your app is running in Capacito
:::
-## Keyboard
+## Keyboard {/* #keyboard */}
The `useKeyboard` function returns an object that contains the state of the on-screen keyboard. This object provides information such as whether or not the on-screen keyboard is presented and what the height of the keyboard is in pixels. This information is provided in a Vue `ref` so it will be reactive in your application.
@@ -132,7 +132,7 @@ watch(keyboardHeight, () => {
});
```
-### Interfaces
+### Interfaces {/* #interfaces-2 */}
```ts
interface UseKeyboardResult {
@@ -146,7 +146,7 @@ useKeyboard(): UseKeyboardResult;
Refer to the [Keyboard Documentation](../developing/keyboard) for more information and usage examples.
-## Ionic Lifecycles
+## Ionic Lifecycles {/* #ionic-lifecycles */}
Ionic Vue provides several lifecycle hooks for the `setup()` function to tap into the Ionic Framework page lifecycle.
diff --git a/versioned_docs/version-v9/vue/virtual-scroll.mdx b/versioned_docs/version-v9/vue/virtual-scroll.mdx
index e38a7a74706..1dac1b6895e 100644
--- a/versioned_docs/version-v9/vue/virtual-scroll.mdx
+++ b/versioned_docs/version-v9/vue/virtual-scroll.mdx
@@ -6,7 +6,7 @@
:::
-## Installation
+## Installation {/* #installation */}
To setup the virtual scroller, first install `vue-virtual-scroller`:
@@ -25,11 +25,11 @@ From here, we need to import the virtual scroller's CSS into our app. In `main.t
import 'vue-virtual-scroller/dist/vue-virtual-scroller.css';
```
-## Registering Virtual Scroll Components
+## Registering Virtual Scroll Components {/* #registering-virtual-scroll-components */}
Now that we have the package installed and the CSS imported, we can either import all virtual scroll components or only import the components we want to use. This guide will show how to do both.
-### Installing all Components
+### Installing all Components {/* #installing-all-components */}
To install all virtual scroll components for use your app, add the following import to `main.ts`:
@@ -51,7 +51,7 @@ Installing all components may result in unused virtual scroll components being a
:::
-### Installing Specific Components
+### Installing Specific Components {/* #installing-specific-components */}
To install specific virtual scroll components for use in your app, import the component you want to use in `main.ts`. In this example, we will be using the `RecycleScroller` component:
@@ -67,7 +67,7 @@ app.component('RecycleScroller', RecycleScroller);
After doing this, we will be able to use the `RecycleScroller` component in our app.
-## Usage
+## Usage {/* #usage */}
This example will use the `RecycleScroller` component which only renders the visible items in your list. Other components such as `DynamicScroller` can be used when you do not know the size of the items in advance.
@@ -111,7 +111,7 @@ Now that our template is setup, we need to add some CSS to size the virtual scro
}
```
-## Usage with Ionic Components
+## Usage with Ionic Components {/* #usage-with-ionic-components */}
Ionic Framework requires that features such as collapsible large titles, `ion-infinite-scroll`, `ion-refresher`, and `ion-reorder-group` be used within an `ion-content`. To use these experiences with virtual scrolling, you must add the `.ion-content-scroll-host` class to the virtual scroll viewport.
@@ -129,6 +129,6 @@ For example:
```
-## Further Reading
+## Further Reading {/* #further-reading */}
This guide only covers a small portion of what `vue-virtual-scroller` is capable of. For more details, please refer to the [vue-virtual-scroller documentation](https://github.com/Akryum/vue-virtual-scroller/blob/next/packages/vue-virtual-scroller/README.md).
diff --git a/versioned_docs/version-v9/vue/your-first-app.mdx b/versioned_docs/version-v9/vue/your-first-app.mdx
index 0cc59b68e56..9bccc512350 100644
--- a/versioned_docs/version-v9/vue/your-first-app.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app.mdx
@@ -24,7 +24,7 @@ Here’s the finished app running on all 3 platforms:
allowFullScreen
>
-## What We'll Build
+## What We'll Build {/* #what-well-build */}
We'll create a Photo Gallery app that offers the ability to take photos with your device's camera, display them in a grid, and store them permanently on the device.
@@ -36,7 +36,7 @@ Highlights include:
Find the [complete app code](https://github.com/ionic-team/tutorial-photo-gallery-vue) referenced in this guide on GitHub.
-## Download Required Tools
+## Download Required Tools {/* #download-required-tools */}
Download and install these right away to ensure an optimal Ionic development experience:
@@ -46,7 +46,7 @@ Download and install these right away to ensure an optimal Ionic development exp
- **Windows** users: for the best Ionic experience, we recommend the built-in command line (cmd) or the Powershell CLI, running in Administrator mode.
- **Mac/Linux** users: virtually any terminal will work.
-## Install Ionic Tooling
+## Install Ionic Tooling {/* #install-ionic-tooling */}
Run the following in the command line terminal to install the Ionic CLI (`ionic`), `native-run`, used to run native binaries on devices and simulators/emulators, and `cordova-res`, used to generate native app icons and splash screens:
@@ -68,7 +68,7 @@ Consider setting up npm to operate globally without elevated permissions. Refer
:::
-## Create an App
+## Create an App {/* #create-an-app */}
Next, create an Ionic Vue app that uses the "Tabs" starter template and adds Capacitor for native functionality:
@@ -90,7 +90,7 @@ Next we'll need to install the necessary Capacitor plugins to make the app's nat
npm install @capacitor/camera @capacitor/preferences @capacitor/filesystem
```
-### PWA Elements
+### 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).
@@ -128,7 +128,7 @@ router.isReady().then(() => {
That’s it! Now for the fun part - let’s run the app.
-## Run the App
+## Run the App {/* #run-the-app */}
Run this command next:
@@ -138,7 +138,7 @@ ionic serve
And voilà! Your Ionic app is now running in a web browser. Most of your app can be built and tested right in the browser, greatly increasing development and testing speed.
-## Photo Gallery
+## Photo Gallery {/* #photo-gallery */}
There are three tabs. Click on the "Tab2" tab. It’s a blank canvas, aka the perfect spot to transform into a Photo Gallery. The Ionic CLI features Live Reload, so when you make changes and save them, the app is updated immediately!
diff --git a/versioned_docs/version-v9/vue/your-first-app/2-taking-photos.mdx b/versioned_docs/version-v9/vue/your-first-app/2-taking-photos.mdx
index 051055075ce..4aafcf8da82 100644
--- a/versioned_docs/version-v9/vue/your-first-app/2-taking-photos.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/2-taking-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Taking Photos
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 Gallery Composable
+## Photo Gallery Composable {/* #photo-gallery-composable */}
We will create a standalone composition method paired with [Vue's Composition API](https://v3.vuejs.org/guide/composition-api-introduction.html#why-composition-api) to manage the photos for the gallery.
@@ -89,7 +89,7 @@ _(Your selfie is probably much better than mine)_
After taking a photo, it disappears right away. We need to display it within our app and save it for future access.
-## Displaying Photos
+## Displaying Photos {/* #displaying-photos */}
To define the data structure for our photo metadata, create a new interface named `UserPhoto`. Add this interface at the very bottom of the `usePhotoGallery.ts` file, immediately after the `usePhotoGallery()` method definition.
diff --git a/versioned_docs/version-v9/vue/your-first-app/3-saving-photos.mdx b/versioned_docs/version-v9/vue/your-first-app/3-saving-photos.mdx
index 1d8e539c269..b8a7855d170 100644
--- a/versioned_docs/version-v9/vue/your-first-app/3-saving-photos.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/3-saving-photos.mdx
@@ -13,7 +13,7 @@ sidebar_label: Saving Photos
We’re now able to take multiple photos and display them in a photo gallery on the second tab of our app. These photos, however, are not currently being stored permanently, so when the app is closed, they will be deleted.
-## Filesystem API
+## Filesystem API {/* #filesystem-api */}
Fortunately, saving them to the filesystem only takes a few steps. Begin by creating a new class method, `savePicture()`, in the `usePhotoGallery()` method in `usePhotoGallery.ts`.
diff --git a/versioned_docs/version-v9/vue/your-first-app/4-loading-photos.mdx b/versioned_docs/version-v9/vue/your-first-app/4-loading-photos.mdx
index 9884db3c6ff..42888976f13 100644
--- a/versioned_docs/version-v9/vue/your-first-app/4-loading-photos.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/4-loading-photos.mdx
@@ -15,7 +15,7 @@ We’ve implemented photo taking and saving to the filesystem. There’s one las
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 {/* #preferences-api */}
Open `usePhotoGallery.ts` and begin by defining a constant variable that will act as the key for the store.
diff --git a/versioned_docs/version-v9/vue/your-first-app/5-adding-mobile.mdx b/versioned_docs/version-v9/vue/your-first-app/5-adding-mobile.mdx
index 99c283cb9fa..ee5e2a966f3 100644
--- a/versioned_docs/version-v9/vue/your-first-app/5-adding-mobile.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/5-adding-mobile.mdx
@@ -13,7 +13,7 @@ strip_number_prefixes: false
Our photo gallery app won’t be complete until it runs on iOS, Android, and the web - all using one codebase. All it takes is some small logic changes to support mobile platforms, installing some native tooling, then running the app on a device. Let’s go!
-## Import Platform API
+## Import Platform API {/* #import-platform-api */}
Let’s start with making some small code changes - then our app will “just work” when we deploy it to a device.
@@ -33,7 +33,7 @@ import { isPlatform } from '@ionic/vue';
// ...existing code...
```
-## Platform-specific Logic
+## Platform-specific Logic {/* #platform-specific-logic */}
First, we’ll update the photo saving functionality to support mobile. In the `savePicture()` method, check which platform the app is running on. If it’s “hybrid” (Capacitor, the native runtime), then read the photo file into base64 format using the `Filesystem.readFile()` method. Otherwise, use the same logic as before when running the app on the web.
diff --git a/versioned_docs/version-v9/vue/your-first-app/6-deploying-mobile.mdx b/versioned_docs/version-v9/vue/your-first-app/6-deploying-mobile.mdx
index e5656eab56e..4128b26e3eb 100644
--- a/versioned_docs/version-v9/vue/your-first-app/6-deploying-mobile.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/6-deploying-mobile.mdx
@@ -13,7 +13,7 @@ sidebar_label: Deploying Mobile
Since we added Capacitor to our project when it was first created, there’s only a handful of steps remaining until the Photo Gallery app is on our device!
-## Capacitor Setup
+## Capacitor Setup {/* #capacitor-setup */}
Capacitor is Ionic’s official app runtime that makes it easy to deploy web apps to native platforms like iOS, Android, and more. If you’ve used Cordova in the past, consider reading more about the [differences between Capacitor and Cordova](https://capacitorjs.com/docs/cordova#differences-between-capacitor-and-cordova).
@@ -44,7 +44,7 @@ Note: After making updates to the native portion of the code (such as adding a n
ionic cap sync
```
-## iOS Deployment
+## iOS Deployment {/* #ios-deployment */}
:::important
@@ -82,7 +82,7 @@ Upon tapping the Camera button on the Photo Gallery tab, the permission prompt w

-## Android Deployment
+## Android Deployment {/* #android-deployment */}
Capacitor Android apps are configured and managed through Android Studio. Before running this app on an Android device, there's a couple of steps to complete.
diff --git a/versioned_docs/version-v9/vue/your-first-app/7-live-reload.mdx b/versioned_docs/version-v9/vue/your-first-app/7-live-reload.mdx
index d3448c34b2e..214a6735b2f 100644
--- a/versioned_docs/version-v9/vue/your-first-app/7-live-reload.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/7-live-reload.mdx
@@ -15,7 +15,7 @@ So far, we’ve learned how easy it is to develop a cross-platform app that work
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
+## Live Reload {/* #live-reload */}
Remember `ionic serve`? That was Live Reload working in the browser, allowing us to iterate quickly.
@@ -31,7 +31,7 @@ ionic cap run android -l --external
The Live Reload server will start up, and the native IDE of choice will open if not opened already. Within the IDE, click the Play button to launch the app onto your device.
-## Deleting Photos
+## Deleting Photos {/* #deleting-photos */}
With Live Reload running and the app open on your device, let’s implement photo deletion functionality.
diff --git a/versioned_docs/version-v9/vue/your-first-app/8-distribute.mdx b/versioned_docs/version-v9/vue/your-first-app/8-distribute.mdx
index 85361db62e6..80bfed67fe7 100644
--- a/versioned_docs/version-v9/vue/your-first-app/8-distribute.mdx
+++ b/versioned_docs/version-v9/vue/your-first-app/8-distribute.mdx
@@ -15,13 +15,13 @@ Now that you have built your first app, you are going to want to get it distribu
Below we will run through an overview of the steps.
-## Connect Your Repo
+## Connect Your Repo {/* #connect-your-repo */}
Appflow works directly with Git version control and uses your existing code base as the source of truth for Deploy and Package builds. You will first need to integrate with your hosting service, such as GitHub or Bitbucket, or you can push your code directly to Appflow. Once this is completed, Appflow will have access to your code.
For more on connecting your code repository to Appflow, checkout the [Connect your Repo](https://ionic.io/docs/appflow/quickstart/connect) section inside the Appflow docs.
-## Install the Appflow SDK
+## Install the Appflow SDK {/* #install-the-appflow-sdk */}
The Appflow SDK (also known as Ionic Deploy plugin) will allow you to take advantage of arguably two of the best Appflow features: deploying live updates to your app and bypassing the app stores. Ionic Appflow's Live Update feature is shipped with Appflow SDK and features the capabilities of detecting and syncing the updates for your app that you have pushed to your identified channels within the dashboard.
@@ -36,7 +36,7 @@ ionic deploy add \
For prerequisite and additional instructions on installing the Appflow SDK, visit the [Install the Appflow SDK](https://ionic.io/docs/appflow/quickstart/installation) section inside the Appflow docs.
-## Push a Commit
+## Push a Commit {/* #push-a-commit */}
In order for Appflow to access the latest and greatest changes to your code, you will need to push a commit via the version control integration of your choosing. For those that use GitHub or Bitbucket, this would look as follows:
@@ -48,7 +48,7 @@ git push origin main # push the changes from the main branch to your git host
After the push is made, your commit appears under the `Commits` tab of the Appflow Dashboard. For more information, refer to the [Push a Commit](https://ionic.io/docs/appflow/quickstart/push) section inside the Appflow docs.
-## Deploy a Live Update
+## Deploy a Live Update {/* #deploy-a-live-update */}
With the Appflow SDK installed and your commit pushed up to the Dashboard, you are ready to deploy a live update to a device. The Live Update feature uses the installed Appflow SDK with your native application to listen to a particular Deploy Channel Destination. When a live update is assigned to a Channel Destination, that update will be deployed to user devices running binaries that are configured to listen to that specific Channel Destination.
@@ -66,7 +66,7 @@ Assuming the app is configured correctly to listen to the channel you deployed t
To dive into more details on the steps to deploy a live update, as well as additional information such as disabling deploy for development, check out the [Deploy a Live Update](https://ionic.io/docs/appflow/quickstart/deploy) section inside the Appflow docs.
-## Build a Native Binary
+## Build a Native Binary {/* #build-a-native-binary */}
Next up is a native binary for your app build and deploy process. This is done via the [Ionic Package](https://ionic.io/docs/appflow/package/intro) service. First things first, you will need to create a [Package build](https://ionic.io/docs/appflow/package/builds). This can be done by clicking the `Start build` icon from the `Commits` tab or by clicking the `New build` button in the top right from the `Build > Builds` tab. Then you will select the proper commit for your build and fill in all of the several required fields and any optional fields that you want to specify. After filling in all of the information and the build begins, you can check out it's progress and review the logs if you encounter any errors.
@@ -74,19 +74,19 @@ Given a successful Package build, an iOS binary (`.ipa` or IPA) or/and an Androi
Further information regarding building native binaries can be found inside of the [Build a Native Binary](https://ionic.io/docs/appflow/quickstart/package) section inside the Appflow docs.
-## Create an Automation
+## Create an Automation {/* #create-an-automation */}
[Automations](https://ionic.io/docs/appflow/automation/intro) enable you and your team to utilize the full CI/CD powers of Appflow. You can create automations that trigger [Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) every time your team commits new code to a given branch. The automations can also be configured to use different environments and native configurations for building different versions of your app for development, staging, QA and production.
For more information, visit the [Create an Automation](https://ionic.io/docs/appflow/quickstart/automation) section within the Appflow docs. That section covers creating a single automation. However, you can create multiple automations for different branches or workflows and customize them to fit your needs. An important note is that the ability to create an automation is available for those on our [Basic plans](https://ionic.io/pricing) and above.
-## Create an Environment
+## Create an Environment {/* #create-an-environment */}
[Package builds](https://ionic.io/docs/appflow/package/builds) and [Deploy builds](https://ionic.io/docs/appflow/deploy/builds) can be further customized via [Environments](https://ionic.io/docs/appflow/automation/environments). This powerful feature allows you to create different configurations based on the environment variables passed in at build time. When combined with the [Automation](https://ionic.io/docs/appflow/automation/intro) feature, development teams can easily configure development, staging, and production build configurations, allowing them to embrace DevOps best practices and ship better quality updates faster than ever.
Creating an Environment is available for those on our [Basic plans](https://ionic.io/pricing) and above. More information on this can be found in the [Create an Environment](https://ionic.io/docs/appflow/quickstart/environment) section within the Appflow docs.
-## Create a Native Configuration
+## Create a Native Configuration {/* #create-a-native-configuration */}
[Native Configurations](https://ionic.io/docs/appflow/package/native-configs) allow you to easily modify common configuration values that can change between different environments (development, production, staging, etc.) so you do not need to use extra logic or manually commit them to version control. Native configurations can be attached to any [Package build](https://ionic.io/docs/appflow/package/intro) or [Automation](https://ionic.io/docs/appflow/automation/intro).
@@ -98,7 +98,7 @@ Native configs can be used to:
For access to the ability to create a Native Configuration, you will need to be on our [Basic plans](https://ionic.io/pricing) and above. Additional details of this feature can be found in the [Create a Native Configuration](https://ionic.io/docs/appflow/quickstart/native-config) section within the Appflow docs.
-## What’s Next?
+## What’s Next? {/* #whats-next */}
Congratulations! You developed a complete cross-platform Photo Gallery app that runs on the web, iOS, and Android. Not only that, you have also then built the app and deployed it to your users' devices!