chore(): more type fixes

This commit is contained in:
Tim Lancina
2016-01-13 16:34:27 -06:00
parent bd69104ac1
commit 3a41dfeb6b
4 changed files with 14 additions and 15 deletions

View File

@ -1,4 +1,4 @@
import {Directive, ElementRef, Renderer, Optional, EventEmitter, Input, Output, HostListener, ContentChildren} from 'angular2/core';
import {Directive, ElementRef, Renderer, Optional, EventEmitter, Input, Output, HostListener, ContentChildren, QueryList} from 'angular2/core';
import {NgControl} from 'angular2/common';
import {isDefined} from '../../util/util';
@ -131,16 +131,15 @@ export class SegmentButton {
selector: 'ion-segment'
})
export class Segment {
@ContentChildren(SegmentButton) _buttons;
value: string;
onChange = (_) => {};
onTouched = (_) => {};
@Output() change: EventEmitter<SegmentButton> = new EventEmitter();
value: any;
constructor(
@Optional() ngControl: NgControl
) {
this.onChange = (_) => {};
this.onTouched = (_) => {};
@ContentChildren(SegmentButton) _buttons: QueryList<SegmentButton>;
constructor(@Optional() ngControl: NgControl) {
if (ngControl) {
ngControl.valueAccessor = this;
}