This commit is contained in:
Max Lynch
2015-03-18 17:23:39 -05:00
parent aa5b1535a8
commit 6c855b6fea

View File

@ -1,4 +1,4 @@
import {NgElement, Component, Template} from 'angular2/angular2';
import {Compiler, NgElement, Component, Template} from 'angular2/angular2';
import {Ion} from '../ion';
@Component({
@ -17,7 +17,7 @@ class ModalWrapper extends Ion {
console.log('element', el)
}
show() {
this.element.domElement.classList.add('active')
//this.element.domElement.classList.add('active')
}
hide() {
}
@ -36,9 +36,28 @@ class ModalWrapper extends Ion {
</ion-modal-wrapper>`
})
export class Modal extends Ion {
constructor() {}
//compiler: Compiler;
constructor(compiler: Compiler, @NgElement() el : NgElement) {
this.element = el
this.compiler = compiler
console.log('Got compiler', Modal.annotations)
}
static create() {
var m = new Modal()
return m
}
show() {
console.log('Modal show')
}
static show() {
console.log('Showing modal')
var newModal = Modal.create()
newModal.show()
return newModal
}
}