diff --git a/ionic/components.ts b/ionic/components.ts index 5e060158f7..54c7cc048d 100644 --- a/ionic/components.ts +++ b/ionic/components.ts @@ -1,6 +1,7 @@ export * from './components/app/app' export * from './components/app/id' export * from './components/action-sheet/action-sheet' +export * from './components/alert/alert' export * from './components/blur/blur' export * from './components/button/button' export * from './components/checkbox/checkbox' diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts new file mode 100644 index 0000000000..b5fe5488a9 --- /dev/null +++ b/ionic/components/alert/alert.ts @@ -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; + } + +} diff --git a/ionic/components/alert/test/basic/index.ts b/ionic/components/alert/test/basic/index.ts new file mode 100644 index 0000000000..75d0632a4e --- /dev/null +++ b/ionic/components/alert/test/basic/index.ts @@ -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() { + + } +} diff --git a/ionic/components/alert/test/basic/main.html b/ionic/components/alert/test/basic/main.html new file mode 100644 index 0000000000..928e705a0e --- /dev/null +++ b/ionic/components/alert/test/basic/main.html @@ -0,0 +1,18 @@ + + + + Alert + Prompt + Confirm + + + Alert Opened: {{alertOpen}} + Prompt Opened: {{promptOpen}} + Prompt Result: {{promptResult}} + Confirm Opened: {{confirmOpen}} + Confirm Result: {{confirmResult}} + + + + +
+ Alert Opened: {{alertOpen}} + Prompt Opened: {{promptOpen}} + Prompt Result: {{promptResult}} + Confirm Opened: {{confirmOpen}} + Confirm Result: {{confirmResult}} +