Skip to content
Merged
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/input/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 { IonInput, IonItem, IonList } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList],
})
export class ExampleComponent {}
```
21 changes: 19 additions & 2 deletions static/usage/v7/input/basic/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ 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/input/basic/demo.html" size="300px" />
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/input/basic/demo.html"
size="300px"
/>
12 changes: 12 additions & 0 deletions static/usage/v7/input/clear/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 { IonInput, IonItem, IonList } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList],
})
export class ExampleComponent {}
```
21 changes: 19 additions & 2 deletions static/usage/v7/input/clear/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ 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/input/clear/demo.html" size="250px" />
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/input/clear/demo.html"
size="250px"
/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList],
})
export class ExampleComponent {}
```
11 changes: 9 additions & 2 deletions static/usage/v7/input/counter-alignment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +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';

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,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/input/counter-alignment/demo.html"
/>
3 changes: 3 additions & 0 deletions static/usage/v7/input/counter/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonInput } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput],
})
export class ExampleComponent {
customCounterFormatter(inputLength: number, maxLength: number) {
Expand Down
12 changes: 12 additions & 0 deletions static/usage/v7/input/fill/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 { IonInput } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/input/fill/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ 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';

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 }}
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/input/fill/demo.html"
size="250px"
mode="md"
Expand Down
10 changes: 6 additions & 4 deletions static/usage/v7/input/filtering/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
```ts
import { Component, ViewChild } from '@angular/core';
import type { IonInput } from '@ionic/angular';
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList],
})
export class ExampleComponent {
inputModel = '';

@ViewChild('ionInputEl', { static: true }) ionInputEl!: IonInput;

onInput(ev) {
const value = ev.target!.value;
onInput(ev: CustomEvent) {
const value = (ev.target as HTMLIonInputElement).value ?? '';

// Removes non alphanumeric characters
const filteredValue = value.replace(/[^a-zA-Z0-9]+/g, '');
const filteredValue = (value as string).replace(/[^a-zA-Z0-9]+/g, '');

/**
* Update both the state variable and
Expand Down
12 changes: 12 additions & 0 deletions static/usage/v7/input/helper-error/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 { IonInput } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput],
})
export class ExampleComponent {}
```
11 changes: 9 additions & 2 deletions static/usage/v7/input/helper-error/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +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';

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,
angular: {
files: {
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
},
}}
src="usage/v7/input/helper-error/demo.html"
size="150px"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList],
})
export class ExampleComponent {}
```
16 changes: 14 additions & 2 deletions static/usage/v7/input/label-placement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,23 @@ 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';

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 }}
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/input/label-placement/demo.html"
size="300px"
/>
12 changes: 12 additions & 0 deletions static/usage/v7/input/label-slot/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 { IonInput, IonItem, IonList, IonText } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList, IonText],
})
export class ExampleComponent {}
```
20 changes: 18 additions & 2 deletions static/usage/v7/input/label-slot/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/input/label-slot/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/input/label-slot/demo.html"
/>
19 changes: 0 additions & 19 deletions static/usage/v7/input/mask/angular/app_module_ts.md

This file was deleted.

5 changes: 5 additions & 0 deletions static/usage/v7/input/mask/angular/example_component_ts.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
```ts
import { Component } from '@angular/core';
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';
import { FormsModule } from '@angular/forms';

import { MaskitoOptions, MaskitoElementPredicate, maskitoTransform } from '@maskito/core';
import { MaskitoDirective } from '@maskito/angular';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [FormsModule, IonInput, IonItem, IonList, MaskitoDirective],
})
export class ExampleComponent {
readonly phoneMask: MaskitoOptions = {
Expand Down
2 changes: 0 additions & 2 deletions static/usage/v7/input/mask/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import react_main_tsx from './react.md';

import vue_example_vue from './vue.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';

Expand Down Expand Up @@ -43,7 +42,6 @@ import angular_example_component_ts from './angular/example_component_ts.md';
},
angular: {
files: {
'src/app/app.module.ts': angular_app_module_ts,
'src/app/example.component.html': angular_example_component_html,
'src/app/example.component.ts': angular_example_component_ts,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonInput, IonItem, IonList } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonInput, IonItem, IonList],
})
export class ExampleComponent {}
```
Loading