Files
Brandy Carney 4fca31ec36 fix(segment): add disabled property to segment and segment button
rename Sass variables for opacity for consistency

references #5639
2016-04-27 16:09:07 -04:00

43 lines
918 B
TypeScript

import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
import {App, IonicApp} from 'ionic-angular';
@App({
templateUrl: 'main.html',
providers: [FormBuilder],
directives: [FORM_DIRECTIVES]
})
class MyApp {
relationship: string = 'enemies';
modelStyle: string = 'B';
appType: string = 'free';
icons: string = 'camera';
isDisabled: boolean = true;
myForm;
constructor(fb: FormBuilder) {
this.myForm = fb.group({
mapStyle: ['active', Validators.required]
});
}
toggleDisabled() {
this.isDisabled = !this.isDisabled;
}
onSegmentChanged(segmentButton) {
console.log("Segment changed to", segmentButton.value);
}
onSegmentSelected(segmentButton) {
console.log("Segment selected", segmentButton.value);
}
doSubmit(event) {
console.log('Submitting form', this.myForm.value);
event.preventDefault();
}
}