Skip to content

Commit 329a1d5

Browse files
committed
docs(quickstart): only use full file path in the code title
1 parent 1662836 commit 329a1d5

File tree

9 files changed

+88
-88
lines changed

9 files changed

+88
-88
lines changed

docs/angular/quickstart.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Let's walk through these files to understand the app's structure.
7979

8080
## View the App Component
8181

82-
The root of your app is defined in `src/app/app.component.ts`:
82+
The root of your app is defined in `app.component.ts`:
8383

8484
```ts title="src/app/app.component.ts"
8585
import { Component } from '@angular/core';
@@ -95,7 +95,7 @@ export class AppComponent {
9595
}
9696
```
9797

98-
And its template in `src/app/app.component.html`:
98+
And its template in `app.component.html`:
9999

100100
```html title="src/app/app.component.html"
101101
<ion-app>
@@ -107,7 +107,7 @@ This sets up the root of your application, using Ionic's `ion-app` and `ion-rout
107107

108108
## View Routes
109109

110-
Routes are defined in `src/app/app.routes.ts`:
110+
Routes are defined in `app.routes.ts`:
111111

112112
```ts title="src/app/app.routes.ts"
113113
import { Routes } from '@angular/router';
@@ -129,7 +129,7 @@ When you visit the root URL (`/`), the `HomePage` component will be loaded.
129129

130130
## View the Home Page
131131

132-
The Home page component, defined in `src/app/home/home.page.ts`, imports the Ionic components it uses:
132+
The Home page component, defined in `home.page.ts`, imports the Ionic components it uses:
133133

134134
```ts title="src/app/home/home.page.ts"
135135
import { Component } from '@angular/core';
@@ -146,7 +146,7 @@ export class HomePage {
146146
}
147147
```
148148

149-
And the template, in the `src/app/home/home.page.html` file, uses those components:
149+
And the template, in the `home.page.html` file, uses those components:
150150

151151
```html title="src/app/home/home.page.html"
152152
<ion-header [translucent]="true">
@@ -190,7 +190,7 @@ You can enhance your Home page with more Ionic UI components. For example, add a
190190
</ion-content>
191191
```
192192

193-
Then, import the `IonButton` component in `src/app/home/home.page.ts`:
193+
Then, import the `IonButton` component in `home.page.ts`:
194194

195195
```ts title="src/app/home/home.page.ts"
196196
import { IonButton, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';
@@ -209,9 +209,9 @@ To add a new page, generate it with the CLI:
209209
ionic generate page new
210210
```
211211

212-
A route will be automatically added to `src/app/app.routes.ts`.
212+
A route will be automatically added to `app.routes.ts`.
213213

214-
In `src/app/new/new.page.html`, you can add a [Back Button](/docs/api/back-button) to the [Toolbar](/docs/api/toolbar):
214+
In `new.page.html`, you can add a [Back Button](/docs/api/back-button) to the [Toolbar](/docs/api/toolbar):
215215

216216
```html title="src/app/new/new.page.html"
217217
<ion-header [translucent]="true">
@@ -224,7 +224,7 @@ In `src/app/new/new.page.html`, you can add a [Back Button](/docs/api/back-butto
224224
</ion-header>
225225
```
226226

227-
And import `IonBackButton` and `IonButtons` in `src/app/new/new.page.ts`:
227+
And import `IonBackButton` and `IonButtons` in `new.page.ts`:
228228

229229
```ts title="src/app/new/new.page.ts"
230230
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';
@@ -239,13 +239,13 @@ The `ion-back-button` will automatically handle navigation back to the previous
239239

240240
## Navigate to the New Page
241241

242-
To navigate to the new page, update the button in `src/app/home/home.page.html`:
242+
To navigate to the new page, update the button in `home.page.html`:
243243

244244
```html title="src/app/home/home.page.html"
245245
<ion-button [routerLink]="['/new']">Navigate</ion-button>
246246
```
247247

248-
Then, import `RouterLink` in `src/app/home/home.page.ts`:
248+
Then, import `RouterLink` in `home.page.ts`:
249249

250250
```ts title="src/app/home/home.page.ts"
251251
import { RouterLink } from '@angular/router';
@@ -262,7 +262,7 @@ Navigating can also be performed using Angular's Router service. See the [Angula
262262

263263
## Add Icons to the New Page
264264

265-
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 `src/app/new/new.page.html`:
265+
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`:
266266

267267
```html title="src/app/new/new.page.html"
268268
<ion-content>
@@ -273,7 +273,7 @@ Ionic Angular comes with [Ionicons](https://ionic.io/ionicons/) pre-installed. Y
273273
</ion-content>
274274
```
275275

276-
You'll also need to import and register these icons in `src/app/new/new.page.ts`:
276+
You'll also need to import and register these icons in `new.page.ts`:
277277

278278
```ts title="src/app/new/new.page.ts"
279279
// ...existing imports...
@@ -299,15 +299,15 @@ export class NewPage implements OnInit {
299299
}
300300
```
301301

302-
Alternatively, you can register icons in `src/app/app.component.ts` to use them throughout your app.
302+
Alternatively, you can register icons in `app.component.ts` to use them throughout your app.
303303

304304
For more information, see the [Icon documentation](/docs/api/icon) and the [Ionicons documentation](https://ionic.io/ionicons/).
305305

306306
## Call Component Methods
307307

308308
Let's add a button that can scroll the content area to the bottom.
309309

310-
Update the `ion-content` in your `src/app/new/new.page.html` to include a button and some items after the existing icons:
310+
Update the `ion-content` in your `new.page.html` to include a button and some items after the existing icons:
311311

312312
```html title="src/app/new/new.page.html"
313313
<ion-content [fullscreen]="true" #content>

docs/javascript/quickstart.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ This copies the necessary Ionic files that Capacitor will need to work with lazy
120120

121121
## Initialize Ionic
122122

123-
Replace the contents of `src/main.js` with the following:
123+
Replace the contents of `main.js` with the following:
124124

125125
```js title="src/main.js"
126126
// Load Ionic
@@ -230,7 +230,7 @@ This creates a custom element called `home-page` that contains the layout for yo
230230
For detailed information about Ionic layout components, see the [Header](/docs/api/header), [Toolbar](/docs/api/toolbar), [Title](/docs/api/title), and [Content](/docs/api/content) documentation.
231231
:::
232232

233-
Next, add a `<script>` tag before the `src/main.js` import in `index.html` to import the Home page:
233+
Next, add a `<script>` tag before the `main.js` import in `index.html` to import the Home page:
234234

235235
```html title="index.html"
236236
<script type="module">
@@ -246,7 +246,7 @@ At this point your browser should be displaying the Home page.
246246

247247
## Add an Ionic Component
248248

249-
You can enhance your Home page with more Ionic UI components. For example, add a [Button](/docs/api/button) to navigate to another page. Update the `HomePage` component in `src/pages/HomePage.js`:
249+
You can enhance your Home page with more Ionic UI components. For example, add a [Button](/docs/api/button) to navigate to another page. Update the `HomePage` component in `HomePage.js`:
250250

251251
```js title="src/pages/HomePage.js"
252252
class HomePage extends HTMLElement {
@@ -314,7 +314,7 @@ Next, update the `<script>` tag which imports the Home page in the `index.html`
314314

315315
## Navigate to the New Page
316316

317-
To navigate to the new page, update the button in `src/pages/HomePage.js` to be inside of an `ion-router-link`:
317+
To navigate to the new page, update the button in `HomePage.js` to be inside of an `ion-router-link`:
318318

319319
```html title="src/pages/HomePage.js"
320320
<ion-router-link href="/new">
@@ -332,7 +332,7 @@ Navigating can also be performed programmatically using `document.querySelector(
332332

333333
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.
334334

335-
Add the necessary imports and register the icons in `src/main.js`:
335+
Add the necessary imports and register the icons in `main.js`:
336336

337337
```js title="src/main.js"
338338
// ...Ionic initialization
@@ -346,7 +346,7 @@ addIcons({ heart, logoIonic });
346346
// ...CSS imports
347347
```
348348

349-
Next, update `src/pages/NewPage.js` to include the icons:
349+
Next, update `NewPage.js` to include the icons:
350350

351351
```js title="src/pages/NewPage.js"
352352
class NewPage extends HTMLElement {
@@ -377,7 +377,7 @@ For more information, see the [Icon documentation](/docs/api/icon) and the [Ioni
377377

378378
## Call Component Methods
379379

380-
Let's add a button that can scroll the content area to the bottom. Update `src/pages/NewPage.js` to include scrollable content and a scroll button:
380+
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:
381381

382382
```js title="src/pages/NewPage.js"
383383
class NewPage extends HTMLElement {

docs/react/quickstart.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Let's walk through these files to understand the app's structure.
7575

7676
## View the App Component
7777

78-
The root of your app is defined in `src/App.tsx`:
78+
The root of your app is defined in `App.tsx`:
7979

8080
```tsx title="src/App.tsx"
8181
import { Redirect, Route } from 'react-router-dom';
@@ -109,7 +109,7 @@ This sets up the root of your application, using Ionic's `IonApp` and `IonReactR
109109

110110
## View Routes
111111

112-
Routes are defined within the `IonRouterOutlet` in `src/App.tsx`:
112+
Routes are defined within the `IonRouterOutlet` in `App.tsx`:
113113

114114
```tsx title="src/App.tsx"
115115
<IonRouterOutlet>
@@ -126,7 +126,7 @@ When you visit the root URL (`/`), the `Home` component will be loaded.
126126

127127
## View the Home Page
128128

129-
The Home page component, defined in `src/pages/Home.tsx`, imports the Ionic components and defines the page template:
129+
The Home page component, defined in `Home.tsx`, imports the Ionic components and defines the page template:
130130

131131
```tsx title="src/pages/Home.tsx"
132132
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';
@@ -164,7 +164,7 @@ For detailed information about Ionic layout components, see the [Header](/docs/a
164164

165165
## Add an Ionic Component
166166

167-
You can enhance your Home page with more Ionic UI components. For example, import and add a [Button](/docs/api/button) at the end of the `IonContent` in `src/pages/Home.tsx`:
167+
You can enhance your Home page with more Ionic UI components. For example, import and add a [Button](/docs/api/button) at the end of the `IonContent` in `Home.tsx`:
168168

169169
```tsx title="src/pages/Home.tsx"
170170
import { IonButton, IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';
@@ -192,7 +192,7 @@ export default Home;
192192

193193
## Add a New Page
194194

195-
Create a new page at `src/pages/New.tsx`:
195+
Create a new page at `New.tsx`:
196196

197197
```tsx title="src/pages/New.tsx"
198198
import { IonBackButton, IonButtons, IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from '@ionic/react';
@@ -230,7 +230,7 @@ When creating your own pages, always use `IonPage` as the root component. This i
230230

231231
## Navigate to the New Page
232232

233-
To navigate to the new page, create a route for it by first importing it at the top of `src/App.tsx` after the `Home` import:
233+
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:
234234

235235
```tsx title="src/App.tsx"
236236
import New from './pages/New';
@@ -252,7 +252,7 @@ Then, add its route in `IonRouterOutlet`:
252252
</IonRouterOutlet>
253253
```
254254

255-
Once that is done, update the button in `src/pages/Home.tsx`:
255+
Once that is done, update the button in `Home.tsx`:
256256

257257
```tsx title="src/pages/Home.tsx"
258258
<IonButton routerLink="/new">Navigate</IonButton>
@@ -266,7 +266,7 @@ Navigating can also be performed programmatically using React Router's `history`
266266

267267
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.
268268

269-
Update the imports in `src/pages/New.tsx` to import `IonIcon` and the `heart` and `logoIonic` icons:
269+
Update the imports in `New.tsx` to import `IonIcon` and the `heart` and `logoIonic` icons:
270270

271271
```tsx title="src/pages/New.tsx"
272272
import { IonBackButton, IonButtons, IonContent, IonHeader, IonIcon, IonPage, IonTitle, IonToolbar } from '@ionic/react';
@@ -288,7 +288,7 @@ For more information, see the [Icon documentation](/docs/api/icon) and the [Ioni
288288

289289
Let's add a button that can scroll the content area to the bottom.
290290

291-
Update `src/pages/New.tsx` to add a `ref` on `IonContent` and a button and some items after the existing icons:
291+
Update `New.tsx` to add a `ref` on `IonContent` and a button and some items after the existing icons:
292292

293293
```tsx title="src/pages/New.tsx"
294294
<IonContent ref={content}>

docs/vue/quickstart.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Let's walk through these files to understand the app's structure.
7373

7474
## View the App Component
7575

76-
The root of your app is defined in `src/App.vue`:
76+
The root of your app is defined in `App.vue`:
7777

7878
```vue title="src/App.vue"
7979
<template>
@@ -91,7 +91,7 @@ This sets up the root of your application, using Ionic's `ion-app` and `ion-rout
9191

9292
## View Routes
9393

94-
Routes are defined in `src/router/index.ts`:
94+
Routes are defined in `router/index.ts`:
9595

9696
```ts title="src/router/index.ts"
9797
import { createRouter, createWebHistory } from '@ionic/vue-router';
@@ -122,7 +122,7 @@ When you visit the root URL (`/`), the `HomePage` component will be loaded.
122122

123123
## View the Home Page
124124

125-
The Home page component, defined in `src/views/HomePage.vue`, imports the Ionic components and defines the page template:
125+
The Home page component, defined in `HomePage.vue`, imports the Ionic components and defines the page template:
126126

127127
```vue title="src/views/HomePage.vue"
128128
<template>
@@ -188,7 +188,7 @@ import { IonButton, IonContent, IonHeader, IonPage, IonTitle, IonToolbar } from
188188

189189
## Add a New Page
190190

191-
Create a new page at `src/views/NewPage.vue`:
191+
Create a new page at `NewPage.vue`:
192192

193193
```vue title="src/views/NewPage.vue"
194194
<template>
@@ -225,7 +225,7 @@ When creating your own pages, always use `ion-page` as the root component. This
225225

226226
## Navigate to the New Page
227227

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+
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:
229229

230230
```ts title="src/router/index.ts"
231231
import NewPage from '../views/NewPage.vue';
@@ -252,7 +252,7 @@ const routes: Array<RouteRecordRaw> = [
252252
];
253253
```
254254

255-
Once that is done, update the button in `src/views/HomePage.vue`:
255+
Once that is done, update the button in `HomePage.vue`:
256256

257257
```vue title="src/views/HomePage.vue"
258258
<ion-button router-link="/new">Navigate</ion-button>
@@ -266,7 +266,7 @@ Navigating can also be performed programmatically using Vue Router, and routes c
266266

267267
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.
268268

269-
Update the imports in `src/views/NewPage.vue` to import `IonIcon` and the `heart` and `logoIonic` icons:
269+
Update the imports in `NewPage.vue` to import `IonIcon` and the `heart` and `logoIonic` icons:
270270

271271
```vue title="src/views/NewPage.vue"
272272
<script setup lang="ts">
@@ -290,7 +290,7 @@ For more information, see the [Icon documentation](/docs/api/icon) and the [Ioni
290290

291291
Let's add a button that can scroll the content area to the bottom.
292292

293-
Update `src/views/NewPage.vue` to include a ref on `ion-content` and a button and some items after the existing icons:
293+
Update `NewPage.vue` to include a ref on `ion-content` and a button and some items after the existing icons:
294294

295295
```vue title="src/views/NewPage.vue"
296296
<ion-content ref="content">

0 commit comments

Comments
 (0)