mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +08:00
wip
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
export * from './components/app/app'
|
export * from './components/app/app'
|
||||||
export * from './components/app/id'
|
export * from './components/app/id'
|
||||||
export * from './components/action-sheet/action-sheet'
|
export * from './components/action-sheet/action-sheet'
|
||||||
|
export * from './components/alert/alert'
|
||||||
export * from './components/blur/blur'
|
export * from './components/blur/blur'
|
||||||
export * from './components/button/button'
|
export * from './components/button/button'
|
||||||
export * from './components/checkbox/checkbox'
|
export * from './components/checkbox/checkbox'
|
||||||
|
25
ionic/components/alert/alert.ts
Normal file
25
ionic/components/alert/alert.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import {Component, ElementRef, Injectable, Renderer} from 'angular2/core';
|
||||||
|
import {NgClass, NgIf, NgFor, FORM_DIRECTIVES} from 'angular2/common';
|
||||||
|
|
||||||
|
import {OverlayController} from '../overlay/overlay-controller';
|
||||||
|
import {Config} from '../../config/config';
|
||||||
|
import {Animation} from '../../animations/animation';
|
||||||
|
import {NavParams} from '../nav/nav-controller';
|
||||||
|
import {Button} from '../button/button';
|
||||||
|
import {extend} from '../../util/util';
|
||||||
|
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class Alert {
|
||||||
|
|
||||||
|
constructor(private _ctrl: OverlayController, private _config: Config) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static create() {
|
||||||
|
let alert = new Alert();
|
||||||
|
|
||||||
|
return alert;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
29
ionic/components/alert/test/basic/index.ts
Normal file
29
ionic/components/alert/test/basic/index.ts
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
import {App, Alert} from 'ionic/ionic';
|
||||||
|
|
||||||
|
|
||||||
|
@App({
|
||||||
|
templateUrl: 'main.html'
|
||||||
|
})
|
||||||
|
class E2EApp {
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.alertOpen = false;
|
||||||
|
this.confirmOpen = false;
|
||||||
|
this.confirmResult = '';
|
||||||
|
this.promptOpen = false;
|
||||||
|
this.promptResult = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
doAlert() {
|
||||||
|
debugger;
|
||||||
|
let alert = Alert.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
doPrompt() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
doConfirm() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
18
ionic/components/alert/test/basic/main.html
Normal file
18
ionic/components/alert/test/basic/main.html
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
<ion-content padding>
|
||||||
|
|
||||||
|
<button class="e2eOpenAlert" (click)="doAlert()">Alert</button>
|
||||||
|
<button class="e2eOpenPrompt" (click)="doPrompt()">Prompt</button>
|
||||||
|
<button class="e2eOpenConfirm" (click)="doConfirm()">Confirm</button>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
Alert Opened: {{alertOpen}}
|
||||||
|
Prompt Opened: {{promptOpen}}
|
||||||
|
Prompt Result: {{promptResult}}
|
||||||
|
Confirm Opened: {{confirmOpen}}
|
||||||
|
Confirm Result: {{confirmResult}}
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
<ion-overlay></ion-overlay>
|
Reference in New Issue
Block a user