mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 21:15:24 +08:00
Modal
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
import {NgElement, Component, Template} from 'angular2/angular2';
|
import {Compiler, NgElement, Component, Template} from 'angular2/angular2';
|
||||||
import {Ion} from '../ion';
|
import {Ion} from '../ion';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -17,7 +17,7 @@ class ModalWrapper extends Ion {
|
|||||||
console.log('element', el)
|
console.log('element', el)
|
||||||
}
|
}
|
||||||
show() {
|
show() {
|
||||||
this.element.domElement.classList.add('active')
|
//this.element.domElement.classList.add('active')
|
||||||
}
|
}
|
||||||
hide() {
|
hide() {
|
||||||
}
|
}
|
||||||
@ -36,9 +36,28 @@ class ModalWrapper extends Ion {
|
|||||||
</ion-modal-wrapper>`
|
</ion-modal-wrapper>`
|
||||||
})
|
})
|
||||||
export class Modal extends Ion {
|
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() {
|
static show() {
|
||||||
console.log('Showing modal')
|
console.log('Showing modal')
|
||||||
|
|
||||||
|
var newModal = Modal.create()
|
||||||
|
newModal.show()
|
||||||
|
return newModal
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user