Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(back-button): update angular to standalone #3914

Open
wants to merge 6 commits into
base: ROU-11416
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions static/usage/v7/back-button/basic/angular/app_module_ts.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular/standalone';

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

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonNav],
})
export class ExampleComponent {
component = PageOneComponent;
Expand Down
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 @@ -19,6 +20,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-two',
Expand All @@ -17,6 +18,7 @@ import { Component } from '@angular/core';
<p>Use the back button to navigate to the previous page.</p>
</ion-content>
`,
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
})
export class PageTwoComponent {}
```
2 changes: 0 additions & 2 deletions static/usage/v7/back-button/basic/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 All @@ -26,7 +25,6 @@ import vue_page_two from './vue/page_two_vue.md';
'src/app/example.component.ts': angular_example_component_ts,
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
20 changes: 0 additions & 20 deletions static/usage/v7/back-button/custom/angular/app_module_ts.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular/standalone';

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

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonNav],
})
export class ExampleComponent {
component = PageOneComponent;
Expand Down
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 @@ -19,6 +20,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,9 @@
```ts
import { Component } from '@angular/core';
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
import { caretBack } from 'ionicons/icons';

@Component({
selector: 'app-page-two',
Expand All @@ -17,6 +21,16 @@ import { Component } from '@angular/core';
<p>Use the back button to navigate to the previous page.</p>
</ion-content>
`,
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
})
export class PageTwoComponent {}
export class PageTwoComponent {
constructor() {
/**
* Any icons you want to use in your application
* can be registered in app.component.ts and then
* referenced by name anywhere in your application.
*/
addIcons({ caretBack });
}
}
```
2 changes: 0 additions & 2 deletions static/usage/v7/back-button/custom/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 All @@ -26,7 +25,6 @@ import vue_page_two from './vue/page_two_vue.md';
'src/app/example.component.ts': angular_example_component_ts,
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
20 changes: 0 additions & 20 deletions static/usage/v8/back-button/basic/angular/app_module_ts.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular/standalone';

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

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonNav],
})
export class ExampleComponent {
component = PageOneComponent;
Expand Down
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 @@ -19,6 +20,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-two',
Expand All @@ -17,6 +18,7 @@ import { Component } from '@angular/core';
<p>Use the back button to navigate to the previous page.</p>
</ion-content>
`,
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
})
export class PageTwoComponent {}
```
2 changes: 0 additions & 2 deletions static/usage/v8/back-button/basic/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 All @@ -26,7 +25,6 @@ import vue_page_two from './vue/page_two_vue.md';
'src/app/example.component.ts': angular_example_component_ts,
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down
20 changes: 0 additions & 20 deletions static/usage/v8/back-button/custom/angular/app_module_ts.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
```ts
import { Component } from '@angular/core';
import { IonNav } from '@ionic/angular/standalone';

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

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonNav],
})
export class ExampleComponent {
component = PageOneComponent;
Expand Down
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 @@ -19,6 +20,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,9 @@
```ts
import { Component } from '@angular/core';
import { IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar } from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
import { caretBack } from 'ionicons/icons';

@Component({
selector: 'app-page-two',
Expand All @@ -17,6 +21,16 @@ import { Component } from '@angular/core';
<p>Use the back button to navigate to the previous page.</p>
</ion-content>
`,
imports: [IonBackButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar],
})
export class PageTwoComponent {}
export class PageTwoComponent {
constructor() {
/**
* Any icons you want to use in your application
* can be registered in app.component.ts and then
* referenced by name anywhere in your application.
*/
addIcons({ caretBack });
}
}
```
2 changes: 0 additions & 2 deletions static/usage/v8/back-button/custom/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 All @@ -26,7 +25,6 @@ import vue_page_two from './vue/page_two_vue.md';
'src/app/example.component.ts': angular_example_component_ts,
'src/app/page-one.component.ts': angular_page_one_component_ts,
'src/app/page-two.component.ts': angular_page_two_component_ts,
'src/app/app.module.ts': angular_app_module_ts,
},
},
react: {
Expand Down