mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Popup
This commit is contained in:
18
ionic/components/popup/test/basic/index.ts
Normal file
18
ionic/components/popup/test/basic/index.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import {App, IonicView, IonicApp, IonicConfig, Platform} from 'ionic/ionic';
|
||||
import {Popup} from 'ionic/ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class MyAppCmp {
|
||||
|
||||
constructor(popup: Popup, app: IonicApp, ionicConfig: IonicConfig) {
|
||||
this.popup = popup;
|
||||
|
||||
}
|
||||
|
||||
doAlert() {
|
||||
this.popup.alert('What!?');
|
||||
}
|
||||
}
|
||||
6
ionic/components/popup/test/basic/main.html
Normal file
6
ionic/components/popup/test/basic/main.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<ion-content class="padding">
|
||||
<button primary (click)="doAlert()">Alert</button>
|
||||
<button primary (click)="doPrompt()">Prompt</button>
|
||||
<button primary (click)="doConfirm()">Confirm</button>
|
||||
<button primary (click)="doCustom()">Custom</button>
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user