Skip to content

Commit d3369eb

Browse files
committed
docs(nav): update angular to standalone
1 parent 1859e78 commit d3369eb

23 files changed

+58
-102
lines changed

static/usage/v7/nav/modal-navigation/angular/app_module_ts.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

static/usage/v7/nav/modal-navigation/angular/example_component_ts.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
IonTitle,
1111
IonToolbar,
1212
} from '@ionic/angular/standalone';
13-
import { IonNav } from '@ionic/angular';
1413

1514
import { PageOneComponent } from './page-one.component';
1615

@@ -21,7 +20,7 @@ import { PageOneComponent } from './page-one.component';
2120
imports: [IonButton, IonButtons, IonContent, IonHeader, IonModal, IonNav, IonTitle, IonToolbar],
2221
})
2322
export class ExampleComponent {
24-
@ViewChild('nav') private nav: IonNav;
23+
@ViewChild('nav') private nav!: IonNav;
2524

2625
onWillPresent() {
2726
this.nav.setRoot(PageOneComponent);

static/usage/v7/nav/modal-navigation/angular/page_one_component_ts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
```ts
22
import { Component } from '@angular/core';
3-
import { IonNav } from '@ionic/angular';
3+
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';
44

55
import { PageTwoComponent } from './page-two.component';
66

@@ -12,6 +12,7 @@ import { PageTwoComponent } from './page-two.component';
1212
<ion-button (click)="navigateToPageTwo()">Go to Page Two</ion-button>
1313
</ion-content>
1414
`,
15+
imports: [IonButton, IonContent],
1516
})
1617
export class PageOneComponent {
1718
constructor(private nav: IonNav) {}

static/usage/v7/nav/modal-navigation/angular/page_three_component_ts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
```ts
22
import { Component } from '@angular/core';
3-
import { IonNav } from '@ionic/angular';
3+
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';
44

55
@Component({
66
selector: 'app-page-one',
@@ -11,6 +11,7 @@ import { IonNav } from '@ionic/angular';
1111
<ion-button (click)="navigateToRoot()">Go to Root</ion-button>
1212
</ion-content>
1313
`,
14+
imports: [IonButton, IonContent],
1415
})
1516
export class PageThreeComponent {
1617
constructor(private nav: IonNav) {}

static/usage/v7/nav/modal-navigation/angular/page_two_component_ts.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
```ts
22
import { Component } from '@angular/core';
3-
import { IonNav } from '@ionic/angular';
3+
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';
44

55
import { PageThreeComponent } from './page-three.component';
66

@@ -12,6 +12,7 @@ import { PageThreeComponent } from './page-three.component';
1212
<ion-button (click)="navigateToPageThree()">Go to Page Three</ion-button>
1313
</ion-content>
1414
`,
15+
imports: [IonButton, IonContent],
1516
})
1617
export class PageTwoComponent {
1718
component = PageThreeComponent;

static/usage/v7/nav/modal-navigation/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Playground from '@site/src/components/global/Playground';
22

33
import javascript from './javascript.md';
44

5-
import angular_app_module_ts from './angular/app_module_ts.md';
65
import angular_example_component_ts from './angular/example_component_ts.md';
76
import angular_example_component_html from './angular/example_component_html.md';
87
import angular_page_one_component_ts from './angular/page_one_component_ts.md';
@@ -30,7 +29,6 @@ import vue_page_three from './vue/page_three_vue.md';
3029
'src/app/page-one.component.ts': angular_page_one_component_ts,
3130
'src/app/page-two.component.ts': angular_page_two_component_ts,
3231
'src/app/page-three.component.ts': angular_page_three_component_ts,
33-
'src/app/app.module.ts': angular_app_module_ts,
3432
},
3533
},
3634
react: {

static/usage/v7/nav/nav-link/angular/app_module_ts.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

static/usage/v7/nav/nav-link/angular/page_one_component_ts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import { IonButton, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar } from '@ionic/angular/standalone';
34

45
import { PageTwoComponent } from './page-two.component';
56

@@ -18,6 +19,7 @@ import { PageTwoComponent } from './page-two.component';
1819
</ion-nav-link>
1920
</ion-content>
2021
`,
22+
imports: [IonButton, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar],
2123
})
2224
export class PageOneComponent {
2325
component = PageTwoComponent;

static/usage/v7/nav/nav-link/angular/page_three_component_ts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';
34

45
@Component({
56
selector: 'app-page-one',
@@ -16,6 +17,7 @@ import { Component } from '@angular/core';
1617
<h1>Page Three</h1>
1718
</ion-content>
1819
`,
20+
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
1921
})
2022
export class PageThreeComponent {}
2123
```

static/usage/v7/nav/nav-link/angular/page_two_component_ts.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import {
4+
IonBackButton,
5+
IonButton,
6+
IonButtons,
7+
IonContent,
8+
IonHeader,
9+
IonNavLink,
10+
IonTitle,
11+
IonToolbar,
12+
} from '@ionic/angular/standalone';
313

414
import { PageThreeComponent } from './page-three.component';
515

@@ -23,6 +33,7 @@ import { PageThreeComponent } from './page-three.component';
2333
</div>
2434
</ion-content>
2535
`,
36+
imports: [IonBackButton, IonButton, IonButtons, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar],
2637
})
2738
export class PageTwoComponent {
2839
component = PageThreeComponent;

0 commit comments

Comments
 (0)