Skip to content

Commit

Permalink
docs(nav): update angular to standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney committed Dec 26, 2024
1 parent 1859e78 commit d3369eb
Show file tree
Hide file tree
Showing 23 changed files with 58 additions and 102 deletions.
21 changes: 0 additions & 21 deletions static/usage/v7/nav/modal-navigation/angular/app_module_ts.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';
import { IonNav } from '@ionic/angular';

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

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

onWillPresent() {
this.nav.setRoot(PageOneComponent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular';
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';

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

Expand All @@ -12,6 +12,7 @@ import { PageTwoComponent } from './page-two.component';
<ion-button (click)="navigateToPageTwo()">Go to Page Two</ion-button>
</ion-content>
`,
imports: [IonButton, IonContent],
})
export class PageOneComponent {
constructor(private nav: IonNav) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular';
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';

@Component({
selector: 'app-page-one',
Expand All @@ -11,6 +11,7 @@ import { IonNav } from '@ionic/angular';
<ion-button (click)="navigateToRoot()">Go to Root</ion-button>
</ion-content>
`,
imports: [IonButton, IonContent],
})
export class PageThreeComponent {
constructor(private nav: IonNav) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular';
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';

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

Expand All @@ -12,6 +12,7 @@ import { PageThreeComponent } from './page-three.component';
<ion-button (click)="navigateToPageThree()">Go to Page Three</ion-button>
</ion-content>
`,
imports: [IonButton, IonContent],
})
export class PageTwoComponent {
component = PageThreeComponent;
Expand Down
2 changes: 0 additions & 2 deletions static/usage/v7/nav/modal-navigation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Playground from '@site/src/components/global/Playground';

import javascript from './javascript.md';

import angular_app_module_ts from './angular/app_module_ts.md';
import angular_example_component_ts from './angular/example_component_ts.md';
import angular_example_component_html from './angular/example_component_html.md';
import angular_page_one_component_ts from './angular/page_one_component_ts.md';
Expand Down Expand Up @@ -30,7 +29,6 @@ import vue_page_three from './vue/page_three_vue.md';
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/page-three.component.ts': angular_page_three_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
21 changes: 0 additions & 21 deletions static/usage/v7/nav/nav-link/angular/app_module_ts.md

This file was deleted.

2 changes: 2 additions & 0 deletions static/usage/v7/nav/nav-link/angular/page_one_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonButton, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar } from '@ionic/angular/standalone';

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

Expand All @@ -18,6 +19,7 @@ import { PageTwoComponent } from './page-two.component';
</ion-nav-link>
</ion-content>
`,
imports: [IonButton, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar],
})
export class PageOneComponent {
component = PageTwoComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-page-one',
Expand All @@ -16,6 +17,7 @@ import { Component } from '@angular/core';
<h1>Page Three</h1>
</ion-content>
`,
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
})
export class PageThreeComponent {}
```
11 changes: 11 additions & 0 deletions static/usage/v7/nav/nav-link/angular/page_two_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
```ts
import { Component } from '@angular/core';
import {
IonBackButton,
IonButton,
IonButtons,
IonContent,
IonHeader,
IonNavLink,
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';

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

Expand All @@ -23,6 +33,7 @@ import { PageThreeComponent } from './page-three.component';
</div>
</ion-content>
`,
imports: [IonBackButton, IonButton, IonButtons, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar],
})
export class PageTwoComponent {
component = PageThreeComponent;
Expand Down
2 changes: 0 additions & 2 deletions static/usage/v7/nav/nav-link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Playground from '@site/src/components/global/Playground';

import javascript from './javascript.md';

import angular_app_module_ts from './angular/app_module_ts.md';
import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';
import angular_page_one_component_ts from './angular/page_one_component_ts.md';
Expand Down Expand Up @@ -30,7 +29,6 @@ import vue_page_three from './vue/page_three_vue.md';
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/page-three.component.ts': angular_page_three_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
21 changes: 0 additions & 21 deletions static/usage/v8/nav/modal-navigation/angular/app_module_ts.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';
import { IonNav } from '@ionic/angular';

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

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

onWillPresent() {
this.nav.setRoot(PageOneComponent);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular';
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';

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

Expand All @@ -12,6 +12,7 @@ import { PageTwoComponent } from './page-two.component';
<ion-button (click)="navigateToPageTwo()">Go to Page Two</ion-button>
</ion-content>
`,
imports: [IonButton, IonContent],
})
export class PageOneComponent {
constructor(private nav: IonNav) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular';
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';

@Component({
selector: 'app-page-one',
Expand All @@ -11,6 +11,7 @@ import { IonNav } from '@ionic/angular';
<ion-button (click)="navigateToRoot()">Go to Root</ion-button>
</ion-content>
`,
imports: [IonButton, IonContent],
})
export class PageThreeComponent {
constructor(private nav: IonNav) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular';
import { IonButton, IonContent, IonNav } from '@ionic/angular/standalone';

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

Expand All @@ -12,6 +12,7 @@ import { PageThreeComponent } from './page-three.component';
<ion-button (click)="navigateToPageThree()">Go to Page Three</ion-button>
</ion-content>
`,
imports: [IonButton, IonContent],
})
export class PageTwoComponent {
component = PageThreeComponent;
Expand Down
2 changes: 0 additions & 2 deletions static/usage/v8/nav/modal-navigation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Playground from '@site/src/components/global/Playground';

import javascript from './javascript.md';

import angular_app_module_ts from './angular/app_module_ts.md';
import angular_example_component_ts from './angular/example_component_ts.md';
import angular_example_component_html from './angular/example_component_html.md';
import angular_page_one_component_ts from './angular/page_one_component_ts.md';
Expand Down Expand Up @@ -30,7 +29,6 @@ import vue_page_three from './vue/page_three_vue.md';
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/page-three.component.ts': angular_page_three_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
21 changes: 0 additions & 21 deletions static/usage/v8/nav/nav-link/angular/app_module_ts.md

This file was deleted.

2 changes: 2 additions & 0 deletions static/usage/v8/nav/nav-link/angular/page_one_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonButton, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar } from '@ionic/angular/standalone';

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

Expand All @@ -18,6 +19,7 @@ import { PageTwoComponent } from './page-two.component';
</ion-nav-link>
</ion-content>
`,
imports: [IonButton, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar],
})
export class PageOneComponent {
component = PageTwoComponent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
```ts
import { Component } from '@angular/core';
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-page-one',
Expand All @@ -16,6 +17,7 @@ import { Component } from '@angular/core';
<h1>Page Three</h1>
</ion-content>
`,
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
})
export class PageThreeComponent {}
```
11 changes: 11 additions & 0 deletions static/usage/v8/nav/nav-link/angular/page_two_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
```ts
import { Component } from '@angular/core';
import {
IonBackButton,
IonButton,
IonButtons,
IonContent,
IonHeader,
IonNavLink,
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';

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

Expand All @@ -23,6 +33,7 @@ import { PageThreeComponent } from './page-three.component';
</div>
</ion-content>
`,
imports: [IonBackButton, IonButton, IonButtons, IonContent, IonHeader, IonNavLink, IonTitle, IonToolbar],
})
export class PageTwoComponent {
component = PageThreeComponent;
Expand Down
2 changes: 0 additions & 2 deletions static/usage/v8/nav/nav-link/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Playground from '@site/src/components/global/Playground';

import javascript from './javascript.md';

import angular_app_module_ts from './angular/app_module_ts.md';
import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';
import angular_page_one_component_ts from './angular/page_one_component_ts.md';
Expand Down Expand Up @@ -30,7 +29,6 @@ import vue_page_three from './vue/page_three_vue.md';
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/page-three.component.ts': angular_page_three_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
Loading

0 comments on commit d3369eb

Please sign in to comment.