mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
action-menu / alert
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
import {NgElement, Component, Template, Parent} from 'angular2/angular2'
|
||||
import {ComponentConfig} from 'ionic2/config/component-config'
|
||||
|
||||
export let AlertConfig = new ComponentConfig('alert')
|
||||
|
||||
@Component({
|
||||
selector: 'ion-alert',
|
||||
services: [AlertConfig]
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
<div class="pane-backdrop"></div>
|
||||
<div class="alert-container">
|
||||
|
||||
<div class="alert-content">
|
||||
Do you like cookies?
|
||||
</div>
|
||||
|
||||
<div class="alert-buttons">
|
||||
<button class="button">OK</button>
|
||||
</div>
|
||||
|
||||
</div>`
|
||||
})
|
||||
export class Alert {
|
||||
constructor(
|
||||
configFactory: AlertConfig,
|
||||
@NgElement() ngElement:NgElement
|
||||
) {
|
||||
this.domElement = ngElement.domElement
|
||||
this.domElement.classList.add('pane')
|
||||
this.domElement.classList.add('pane-overlay')
|
||||
this.config = configFactory.create(this)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user