You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -218,23 +219,21 @@ Create a new page at `views/NewPage.vue`:
218
219
219
220
This creates a page with a [Back Button](/docs/api/back-button) in the [Toolbar](/docs/api/toolbar). The back button will automatically handle navigation back to the previous page, or to `/` if there is no history.
220
221
221
-
:::warning Important
222
+
:::warning
222
223
When creating your own pages, always use `ion-page` as the root component. This is essential for proper transitions between pages, base CSS styling that Ionic components depend on, and consistent layout behavior across your app.
223
224
:::
224
225
225
226
## Navigate to the New Page
226
227
227
-
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:
228
+
To navigate to the new page, create a route for it by first importing it at the top of `src/router/index.ts` after the `HomePage` import:
228
229
229
-
To navigate to a new page, add the route to `router/index.ts`
@@ -267,9 +266,9 @@ Navigating can also be performed programmatically using Vue Router, and routes c
267
266
268
267
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.
269
268
270
-
Update the imports in `views/NewPage.vue` to import `IonIcon` and the `heart` and `logoIonic` icons:
269
+
Update the imports in `src/views/NewPage.vue` to import `IonIcon` and the `heart` and `logoIonic` icons:
2. Change the extension of all `.ts` files to `.js`. In a blank Ionic Vue app, this will be the `router/index.ts`, `main.ts`, and files in the `tests` directory.
373
+
2. Change the extension of all `.ts` files to `.js`. In a blank Ionic Vue app, this will be the `src/router/index.ts`, `src/main.ts`, and files in the `tests` directory.
375
374
376
375
3. In `index.html`, change the imported `<script>` file from `/src/main.ts` to `/src/main.js`.
377
376
378
377
4. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: 'off'` from `.eslintrc.js`.
379
378
380
-
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `router/index.js`.
379
+
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `src/router/index.js`.
381
380
382
-
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `App.vue` and `views/HomePage.vue`.
381
+
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
@@ -218,23 +219,21 @@ Create a new page at `views/NewPage.vue`:
218
219
219
220
This creates a page with a [Back Button](/docs/api/back-button) in the [Toolbar](/docs/api/toolbar). The back button will automatically handle navigation back to the previous page, or to `/` if there is no history.
220
221
221
-
:::warning Important
222
+
:::warning
222
223
When creating your own pages, always use `ion-page` as the root component. This is essential for proper transitions between pages, base CSS styling that Ionic components depend on, and consistent layout behavior across your app.
223
224
:::
224
225
225
226
## Navigate to the New Page
226
227
227
-
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:
228
+
To navigate to the new page, create a route for it by first importing it at the top of `src/router/index.ts` after the `HomePage` import:
228
229
229
-
To navigate to a new page, add the route to `router/index.ts`
@@ -267,9 +266,9 @@ Navigating can also be performed programmatically using Vue Router, and routes c
267
266
268
267
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.
269
268
270
-
Update the imports in `views/NewPage.vue` to import `IonIcon` and the `heart` and `logoIonic` icons:
269
+
Update the imports in `src/views/NewPage.vue` to import `IonIcon` and the `heart` and `logoIonic` icons:
2. Change the extension of all `.ts` files to `.js`. In a blank Ionic Vue app, this will be the `router/index.ts`, `main.ts`, and files in the `tests` directory.
373
+
2. Change the extension of all `.ts` files to `.js`. In a blank Ionic Vue app, this will be the `src/router/index.ts`, `src/main.ts`, and files in the `tests` directory.
375
374
376
375
3. In `index.html`, change the imported `<script>` file from `/src/main.ts` to `/src/main.js`.
377
376
378
377
4. Remove `@vue/typescript/recommended` and `@typescript-eslint/no-explicit-any: 'off'` from `.eslintrc.js`.
379
378
380
-
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `router/index.js`.
379
+
5. Remove `Array<RouteRecordRaw>` and the import of `RouteRecordRaw` from `src/router/index.js`.
381
380
382
-
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `App.vue` and `views/HomePage.vue`.
381
+
6. Remove `lang="ts"` from the `script` tags in any of your Vue components that have them. In a blank Ionic Vue app, this should only be `src/App.vue` and `src/views/HomePage.vue`.
0 commit comments