This commit is contained in:
Max Lynch
2015-05-07 20:36:32 -05:00
parent 57aaf7946e
commit 7f1e2dc5df
2 changed files with 17 additions and 6 deletions

View File

@ -1,9 +1,18 @@
import {NgElement, Decorator} from 'angular2/angular2'
import {NgElement, Component, View, Decorator} from 'angular2/angular2'
import {IonicComponent} from 'ionic/config/component'
import {Button} from 'ionic/components/button/button'
@Decorator({
@Component({
selector: 'ion-segment'
})
@View({
template: `<div class="ion-segment" (^click)="buttonClicked($event)">
<content></content>
</div>
`,
directives: [Button]
})
export class Segment {
constructor(
@NgElement() ngElement:NgElement
@ -11,6 +20,10 @@ export class Segment {
this.domElement = ngElement.domElement
this.config = Button.config.invoke(this)
}
buttonClicked(event) {
console.log('Button clicked', event);
}
}
new IonicComponent(Segment, {
})