import {NgElement, Component, View as NgView} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
@Component({
selector: '.back-button',
})
@NgView({
template: `
{{ text }}
`
})
export class BackButton {
constructor(
@NgElement() ngEle:NgElement
) {
this.domElement = ngEle.domElement
setTimeout(() => {
this.config = BackButton.config.invoke(this)
})
}
}
new IonicComponent(BackButton, {
bind: {
icon: {
defaults: {
ios: 'ion-ios-arrow-back',
android: 'ion-android-arrow-back',
core: 'ion-chevron-left'
}
},
text: {
defaults: {
ios: 'Back',
android: '',
core: ''
}
}
}
})