mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 15:51:16 +08:00
chore: sync
This commit is contained in:
@ -45,4 +45,5 @@
|
||||
</p>
|
||||
|
||||
<button id="set-menu-count" (click)="setMenuCount()">Set Menu Count</button>
|
||||
<button id="open-action-sheet" (click)="openActionSheet()">Open Action Sheet</button>
|
||||
</ion-content>
|
||||
|
||||
@ -24,7 +24,7 @@ export class ProvidersComponent {
|
||||
registeredMenuCount = 0;
|
||||
|
||||
constructor(
|
||||
actionSheetCtrl: ActionSheetController,
|
||||
private actionSheetCtrl: ActionSheetController,
|
||||
alertCtrl: AlertController,
|
||||
loadingCtrl: LoadingController,
|
||||
private menuCtrl: MenuController,
|
||||
@ -88,4 +88,12 @@ export class ProvidersComponent {
|
||||
const menus = await this.menuCtrl.getMenus();
|
||||
this.registeredMenuCount = menus.length;
|
||||
}
|
||||
|
||||
async openActionSheet() {
|
||||
const actionSheet = await this.actionSheetCtrl.create({
|
||||
buttons: ['Button']
|
||||
});
|
||||
|
||||
await actionSheet.present();
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
<ul id="content">
|
||||
<button id="open-action-sheet" (click)="openActionSheet()">Open Action Sheets</button>
|
||||
</ul>
|
||||
|
||||
@ -0,0 +1,21 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ActionSheetController } from '@ionic/angular/standalone';
|
||||
|
||||
@Component({
|
||||
selector: 'app-action-sheet-controller',
|
||||
templateUrl: './action-sheet-controller.component.html',
|
||||
standalone: true
|
||||
})
|
||||
export class ActionSheetControllerComponent {
|
||||
registeredMenuCount = 0;
|
||||
|
||||
constructor(private actionSheetCtrl: ActionSheetController) {}
|
||||
|
||||
async openActionSheet() {
|
||||
const actionSheet = await this.actionSheetCtrl.create({
|
||||
buttons: ['Button']
|
||||
});
|
||||
|
||||
await actionSheet.present();
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@ export const routes: Routes = [
|
||||
component: AppComponent,
|
||||
children: [
|
||||
{ path: 'menu-controller', loadComponent: () => import('../menu-controller/menu-controller.component').then(c => c.MenuControllerComponent) },
|
||||
{ path: 'action-sheet-controller', loadComponent: () => import('../action-sheet-controller/action-sheet-controller.component').then(c => c.ActionSheetControllerComponent) },
|
||||
{ path: 'popover', loadComponent: () => import('../popover/popover.component').then(c => c.PopoverComponent) },
|
||||
{ path: 'modal', loadComponent: () => import('../modal/modal.component').then(c => c.ModalComponent) },
|
||||
{ path: 'router-outlet', loadComponent: () => import('../router-outlet/router-outlet.component').then(c => c.RouterOutletComponent) },
|
||||
|
||||
@ -6,6 +6,6 @@
|
||||
</p>
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-checkbox color="danger" formControlName="checkbox"></ion-checkbox>
|
||||
<ion-checkbox formControlName="checkbox"></ion-checkbox>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -6,6 +6,6 @@
|
||||
</p>
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-datetime color="danger" formControlName="datetime"></ion-datetime>
|
||||
<ion-datetime formControlName="datetime"></ion-datetime>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
</p>
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-input color="danger" label="String" formControlName="inputString"></ion-input>
|
||||
<ion-input label="String" formControlName="inputString"></ion-input>
|
||||
<ion-input label="Number" type="number" formControlName="inputNumber"></ion-input>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-radio-group formControlName="radioGroup">
|
||||
<ion-radio color="danger" value="1">One</ion-radio>
|
||||
<ion-radio value="1">One</ion-radio>
|
||||
<ion-radio value="2">Two</ion-radio>
|
||||
</ion-radio-group>
|
||||
</app-value-accessor-test>
|
||||
|
||||
@ -4,6 +4,6 @@
|
||||
This test checks the form integrations with ion-range to make sure values are correctly assigned to the form group.
|
||||
</p>
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-range color="danger" formControlName="range"></ion-range>
|
||||
<ion-range formControlName="range"></ion-range>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -5,6 +5,6 @@
|
||||
group.
|
||||
</p>
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-searchbar color="danger" label="String" formControlName="searchbar"></ion-searchbar>
|
||||
<ion-searchbar label="String" formControlName="searchbar"></ion-searchbar>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
</p>
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-segment color="danger" formControlName="segment">
|
||||
<ion-segment formControlName="segment">
|
||||
<ion-segment-button value="Paid">
|
||||
<ion-label>Paid</ion-label>
|
||||
</ion-segment-button>
|
||||
|
||||
@ -6,6 +6,6 @@
|
||||
</p>
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-textarea color="danger" label="String" formControlName="textarea"></ion-textarea>
|
||||
<ion-textarea label="String" formControlName="textarea"></ion-textarea>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -5,6 +5,6 @@
|
||||
</p>
|
||||
|
||||
<app-value-accessor-test [formGroup]="form">
|
||||
<ion-toggle color="danger" formControlName="toggle"></ion-toggle>
|
||||
<ion-toggle formControlName="toggle"></ion-toggle>
|
||||
</app-value-accessor-test>
|
||||
</div>
|
||||
|
||||
@ -48,7 +48,7 @@ import './zone-flags';
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user