Skip to content

Commit

Permalink
docs(action-sheet): update angular to standalone (#3909)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandyscarney authored Dec 30, 2024
1 parent ef75594 commit 0cadfa7
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
```ts
import { Component } from '@angular/core';

import { ActionSheetController } from '@ionic/angular';
import { ActionSheetController, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonButton],
})
export class ExampleComponent {
constructor(private actionSheetCtrl: ActionSheetController) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
isActionSheetOpen = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';
import type { OverlayEventDetail } from '@ionic/core';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down Expand Up @@ -32,8 +35,8 @@ export class ExampleComponent {

constructor() {}

logResult(ev) {
console.log(JSON.stringify(ev.detail, null, 2));
logResult(event: CustomEvent<OverlayEventDetail<string>>) {
console.log(JSON.stringify(event.detail, null, 2));
}
}
```
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
```ts
import { Component } from '@angular/core';

import { ActionSheetController } from '@ionic/angular';
import { ActionSheetController, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonButton],
})
export class ExampleComponent {
constructor(private actionSheetCtrl: ActionSheetController) {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
isActionSheetOpen = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';
import type { OverlayEventDetail } from '@ionic/core';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down Expand Up @@ -32,8 +35,8 @@ export class ExampleComponent {

constructor() {}

logResult(ev) {
console.log(JSON.stringify(ev.detail, null, 2));
logResult(event: CustomEvent<OverlayEventDetail<string>>) {
console.log(JSON.stringify(event.detail, null, 2));
}
}
```
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
```ts
import { Component } from '@angular/core';
import { IonActionSheet, IonButton } from '@ionic/angular/standalone';

@Component({
selector: 'app-example',
templateUrl: 'example.component.html',
styleUrls: ['./example.component.css'],
imports: [IonActionSheet, IonButton],
})
export class ExampleComponent {
public actionSheetButtons = [
Expand Down

0 comments on commit 0cadfa7

Please sign in to comment.