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

@ -29,7 +29,7 @@ import {isDefined} from '../../util/util';
'role': 'radio', 'role': 'radio',
'class': 'item', 'class': 'item',
'tappable': '', 'tappable': '',
'tabindex': 0, 'tabindex': '0',
'[attr.aria-disabled]': 'disabled' '[attr.aria-disabled]': 'disabled'
}, },
template: template:
@ -44,7 +44,7 @@ import {isDefined} from '../../util/util';
}) })
export class RadioButton { export class RadioButton {
@Input() value: string = ''; @Input() value: string = '';
@Input() public checked: any = false; @Input() checked: any = false;
@Input() disabled: boolean = false; @Input() disabled: boolean = false;
@Input() id: string; @Input() id: string;
@Output() select: EventEmitter<RadioButton> = new EventEmitter(); @Output() select: EventEmitter<RadioButton> = new EventEmitter();

View File

@ -1,4 +1,4 @@
import {Component, ElementRef, onInit} from 'angular2/core'; import {Component, ElementRef} from 'angular2/core';
import {Ion} from '../ion'; import {Ion} from '../ion';
import {Gesture} from '../../gestures/gesture'; import {Gesture} from '../../gestures/gesture';
@ -45,12 +45,12 @@ import * as util from '../../util';
'</scroll-content>' '</scroll-content>'
}) })
export class Scroll extends Ion { export class Scroll extends Ion {
private maxScale: number = 3;
private zoomDuration: number = 250;
private scrollElement: HTMLElement;
constructor(elementRef: ElementRef) { constructor(elementRef: ElementRef) {
super(elementRef); super(elementRef);
this.maxScale = 3;
this.zoomDuration = 250;
} }
/** /**

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

View File

@ -181,7 +181,7 @@ export class Select {
*/ */
@HostListener('click') @HostListener('click')
_click() { _click() {
let isMulti = (this.multiple === true || this.multiple === 'true'); let isMulti = this.multiple === 'true';
// the user may have assigned some options specifically for the alert // the user may have assigned some options specifically for the alert
let alertOptions = merge({}, this.alertOptions); let alertOptions = merge({}, this.alertOptions);