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(buttons): update angular to standalone #3919

Open
wants to merge 4 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
12 changes: 12 additions & 0 deletions static/usage/v7/buttons/basic/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonButton, IonButtons, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonButton, IonButtons, IonTitle, IonToolbar],
})
export class ExampleComponent {}
```
20 changes: 18 additions & 2 deletions static/usage/v7/buttons/basic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.md';
import angular from './angular.md';

<Playground version="7" code={{ javascript, react, vue, angular }} src="usage/v7/buttons/basic/demo.html" />
import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';

<Playground
version="7"
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/buttons/basic/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonButton, IonButtons, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonButton, IonButtons, IonTitle, IonToolbar],
})
export class ExampleComponent {}
```
20 changes: 18 additions & 2 deletions static/usage/v7/buttons/placement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.md';
import angular from './angular.md';

<Playground version="7" code={{ javascript, react, vue, angular }} src="usage/v7/buttons/placement/demo.html" />
import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';

<Playground
version="7"
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/buttons/placement/demo.html"
/>
10 changes: 10 additions & 0 deletions static/usage/v7/buttons/types/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
```ts
import { Component } from '@angular/core';
import {
IonBackButton,
IonButton,
IonButtons,
IonIcon,
IonMenuButton,
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
import { create, ellipsisHorizontal, ellipsisVertical, helpCircle, personCircle, search, star } from 'ionicons/icons';
Expand All @@ -8,6 +17,7 @@ import { create, ellipsisHorizontal, ellipsisVertical, helpCircle, personCircle,
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonBackButton, IonButton, IonButtons, IonIcon, IonMenuButton, IonTitle, IonToolbar],
})
export class ExampleComponent {
constructor() {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```html
<ion-toolbar>
<ion-buttons slot="start">
<ion-button>Button</ion-button>
</ion-buttons>
<ion-title>Default Buttons</ion-title>
</ion-toolbar>
```
12 changes: 12 additions & 0 deletions static/usage/v8/buttons/basic/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonButton, IonButtons, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonButton, IonButtons, IonTitle, IonToolbar],
})
export class ExampleComponent {}
```
20 changes: 18 additions & 2 deletions static/usage/v8/buttons/basic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.md';
import angular from './angular.md';

<Playground version="8" code={{ javascript, react, vue, angular }} src="usage/v8/buttons/basic/demo.html" />
import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';

<Playground
version="8"
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v8/buttons/basic/demo.html"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
```html
<ion-toolbar>
<ion-buttons slot="start">
<ion-button>Start</ion-button>
</ion-buttons>
<ion-title>Buttons</ion-title>
<ion-buttons slot="end">
<ion-button>End</ion-button>
</ion-buttons>
</ion-toolbar>

<ion-toolbar>
<ion-buttons slot="secondary">
<ion-button>Secondary</ion-button>
</ion-buttons>
<ion-title>Buttons</ion-title>
<ion-buttons slot="primary">
<ion-button>Primary</ion-button>
</ion-buttons>
</ion-toolbar>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonButton, IonButtons, IonTitle, IonToolbar } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonButton, IonButtons, IonTitle, IonToolbar],
})
export class ExampleComponent {}
```
20 changes: 18 additions & 2 deletions static/usage/v8/buttons/placement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@ import Playground from '@site/src/components/global/Playground';
import javascript from './javascript.md';
import react from './react.md';
import vue from './vue.md';
import angular from './angular.md';

<Playground version="8" code={{ javascript, react, vue, angular }} src="usage/v8/buttons/placement/demo.html" />
import angular_example_component_html from './angular/example_component_html.md';
import angular_example_component_ts from './angular/example_component_ts.md';

<Playground
version="8"
code={{
javascript,
react,
vue,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v8/buttons/placement/demo.html"
/>
10 changes: 10 additions & 0 deletions static/usage/v8/buttons/types/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
```ts
import { Component } from '@angular/core';
import {
IonBackButton,
IonButton,
IonButtons,
IonIcon,
IonMenuButton,
IonTitle,
IonToolbar,
} from '@ionic/angular/standalone';

import { addIcons } from 'ionicons';
import { create, ellipsisHorizontal, ellipsisVertical, helpCircle, personCircle, search, star } from 'ionicons/icons';
Expand All @@ -8,6 +17,7 @@ import { create, ellipsisHorizontal, ellipsisVertical, helpCircle, personCircle,
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonBackButton, IonButton, IonButtons, IonIcon, IonMenuButton, IonTitle, IonToolbar],
})
export class ExampleComponent {
constructor() {
Expand Down