Skip to content

Commit 0398ca7

Browse files
committed
docs(input): update angular to standalone
1 parent c5926f0 commit 0398ca7

File tree

74 files changed

+920
-46
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+920
-46
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
```html
2+
<ion-list>
3+
<ion-item>
4+
<ion-input label="Default input"></ion-input>
5+
</ion-item>
6+
7+
<ion-item>
8+
<ion-input label="Input with placeholder" placeholder="Enter company name"></ion-input>
9+
</ion-item>
10+
11+
<ion-item>
12+
<ion-input label="Input with value" value="121 S Pinckney St #300"></ion-input>
13+
</ion-item>
14+
15+
<ion-item>
16+
<ion-input label="Readonly input" value="Madison" [readonly]="true"></ion-input>
17+
</ion-item>
18+
19+
<ion-item>
20+
<ion-input label="Disabled input" value="53703" [disabled]="true"></ion-input>
21+
</ion-item>
22+
</ion-list>
23+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
imports: [IonInput, IonItem, IonList],
9+
})
10+
export class ExampleComponent {}
11+
```

static/usage/v7/input/basic/index.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ import Playground from '@site/src/components/global/Playground';
33
import javascript from './javascript.md';
44
import react from './react.md';
55
import vue from './vue.md';
6-
import angular from './angular.md';
76

8-
<Playground version="7" code={{ javascript, react, vue, angular }} src="usage/v7/input/basic/demo.html" size="300px" />
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
9+
10+
<Playground
11+
version="7"
12+
code={{
13+
javascript,
14+
react,
15+
vue,
16+
angular: {
17+
files: {
18+
'src/app/example.component.html': angular_example_component_html,
19+
'src/app/example.component.ts': angular_example_component_ts,
20+
},
21+
},
22+
}}
23+
src="usage/v7/input/basic/demo.html"
24+
size="300px"
25+
/>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
```html
2+
<ion-list>
3+
<ion-item>
4+
<ion-input
5+
label="Input with clear button"
6+
labelPlacement="stacked"
7+
[clearInput]="true"
8+
placeholder="Enter text to see clear button"
9+
value="Default value"
10+
>
11+
</ion-input>
12+
</ion-item>
13+
14+
<ion-item>
15+
<ion-input
16+
label="Input with clear on edit"
17+
labelPlacement="stacked"
18+
[clearOnEdit]="true"
19+
placeholder="Enter text, leave the input, come back and type to clear"
20+
>
21+
</ion-input>
22+
</ion-item>
23+
24+
<ion-item>
25+
<ion-input
26+
label="Password input"
27+
labelPlacement="stacked"
28+
type="password"
29+
placeholder="Enter text, leave the input, come back and type to clear"
30+
>
31+
</ion-input>
32+
</ion-item>
33+
</ion-list>
34+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
imports: [IonInput, IonItem, IonList],
9+
})
10+
export class ExampleComponent {}
11+
```

static/usage/v7/input/clear/index.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@ import Playground from '@site/src/components/global/Playground';
33
import javascript from './javascript.md';
44
import react from './react.md';
55
import vue from './vue.md';
6-
import angular from './angular.md';
76

8-
<Playground version="7" code={{ javascript, react, vue, angular }} src="usage/v7/input/clear/demo.html" size="250px" />
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
9+
10+
<Playground
11+
version="7"
12+
code={{
13+
javascript,
14+
react,
15+
vue,
16+
angular: {
17+
files: {
18+
'src/app/example.component.html': angular_example_component_html,
19+
'src/app/example.component.ts': angular_example_component_ts,
20+
},
21+
},
22+
}}
23+
src="usage/v7/input/clear/demo.html"
24+
size="250px"
25+
/>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```html
2+
<ion-list>
3+
<ion-item>
4+
<ion-input label="Text input" placeholder="Enter text"></ion-input>
5+
</ion-item>
6+
7+
<div class="ion-padding-start">
8+
<ion-input label="Counter input" [counter]="true" maxlength="20"></ion-input>
9+
</div>
10+
</ion-list>
11+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```ts
2+
import { Component } from '@angular/core';
3+
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';
4+
5+
@Component({
6+
selector: 'app-example',
7+
templateUrl: 'example.component.html',
8+
imports: [IonInput, IonItem, IonList],
9+
})
10+
export class ExampleComponent {}
11+
```

static/usage/v7/input/counter-alignment/index.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@ import Playground from '@site/src/components/global/Playground';
33
import javascript from './javascript.md';
44
import react from './react.md';
55
import vue from './vue.md';
6-
import angular from './angular.md';
6+
7+
import angular_example_component_html from './angular/example_component_html.md';
8+
import angular_example_component_ts from './angular/example_component_ts.md';
79

810
<Playground
911
version="7"
1012
code={{
1113
javascript,
1214
react,
1315
vue,
14-
angular,
16+
angular: {
17+
files: {
18+
'src/app/example.component.html': angular_example_component_html,
19+
'src/app/example.component.ts': angular_example_component_ts,
20+
},
21+
},
1522
}}
1623
src="usage/v7/input/counter-alignment/demo.html"
1724
/>

static/usage/v7/input/counter/angular/example_component_ts.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
```ts
22
import { Component } from '@angular/core';
3+
import { IonInput } from '@ionic/angular/standalone';
34

45
@Component({
56
selector: 'app-example',
67
templateUrl: 'example.component.html',
8+
imports: [IonInput],
79
})
810
export class ExampleComponent {
911
customCounterFormatter(inputLength: number, maxLength: number) {

0 commit comments

Comments
 (0)