modal show

This commit is contained in:
Max Lynch
2015-03-18 14:43:26 -05:00
parent 4557c96fcc
commit 73699a36b0
3 changed files with 17 additions and 2 deletions

View File

@ -1,6 +1,10 @@
<ion-tabbar view-title="My Tabs"></ion-tabbar>
<ion-tabbar view-title="Tabs 2"></ion-tabbar>
<ion-tabbar view-title="Tabs 4"></ion-tabbar>
<button (click)="showModal()">Show Modal</button>
<!--
<ion-modal>
<h2>I'm a modal!</h2>
</ion-modal>
-->

View File

@ -15,6 +15,10 @@ class PlaygroundMain {
constructor() {
console.log('Playground Start')
}
showModal() {
Modal.show()
}
}
bootstrap(PlaygroundMain)

View File

@ -1,4 +1,4 @@
import {Component, Template} from 'angular2/angular2';
import {NgElement, Component, Template} from 'angular2/angular2';
import {Ion} from '../ion';
@Component({
@ -12,9 +12,12 @@ import {Ion} from '../ion';
</div>`
})
class ModalWrapper extends Ion {
constructor() {
constructor(@NgElement() el : NgElement) {
this.element = el
console.log('element', el)
}
show() {
this.element.domElement.classList.add('active')
}
hide() {
}
@ -34,4 +37,8 @@ class ModalWrapper extends Ion {
})
export class Modal extends Ion {
constructor() {}
static show() {
console.log('Showing modal')
}
}