From 3a41dfeb6bf75128cd5f626e103c8a2dca38952c Mon Sep 17 00:00:00 2001 From: Tim Lancina Date: Wed, 13 Jan 2016 16:34:27 -0600 Subject: [PATCH] chore(): more type fixes --- ionic/components/radio/radio.ts | 4 ++-- ionic/components/scroll/scroll.ts | 8 ++++---- ionic/components/segment/segment.ts | 15 +++++++-------- ionic/components/select/select.ts | 2 +- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ionic/components/radio/radio.ts b/ionic/components/radio/radio.ts index d5da0cbc31..fd0b452f29 100644 --- a/ionic/components/radio/radio.ts +++ b/ionic/components/radio/radio.ts @@ -29,7 +29,7 @@ import {isDefined} from '../../util/util'; 'role': 'radio', 'class': 'item', 'tappable': '', - 'tabindex': 0, + 'tabindex': '0', '[attr.aria-disabled]': 'disabled' }, template: @@ -44,7 +44,7 @@ import {isDefined} from '../../util/util'; }) export class RadioButton { @Input() value: string = ''; - @Input() public checked: any = false; + @Input() checked: any = false; @Input() disabled: boolean = false; @Input() id: string; @Output() select: EventEmitter = new EventEmitter(); diff --git a/ionic/components/scroll/scroll.ts b/ionic/components/scroll/scroll.ts index 922259a449..f3e11a5375 100644 --- a/ionic/components/scroll/scroll.ts +++ b/ionic/components/scroll/scroll.ts @@ -1,4 +1,4 @@ -import {Component, ElementRef, onInit} from 'angular2/core'; +import {Component, ElementRef} from 'angular2/core'; import {Ion} from '../ion'; import {Gesture} from '../../gestures/gesture'; @@ -45,12 +45,12 @@ import * as util from '../../util'; '' }) export class Scroll extends Ion { + private maxScale: number = 3; + private zoomDuration: number = 250; + private scrollElement: HTMLElement; constructor(elementRef: ElementRef) { super(elementRef); - - this.maxScale = 3; - this.zoomDuration = 250; } /** diff --git a/ionic/components/segment/segment.ts b/ionic/components/segment/segment.ts index 0af9a8cc99..20128632a8 100644 --- a/ionic/components/segment/segment.ts +++ b/ionic/components/segment/segment.ts @@ -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 = new EventEmitter(); - value: any; - constructor( - @Optional() ngControl: NgControl - ) { - this.onChange = (_) => {}; - this.onTouched = (_) => {}; + @ContentChildren(SegmentButton) _buttons: QueryList; + constructor(@Optional() ngControl: NgControl) { if (ngControl) { ngControl.valueAccessor = this; } diff --git a/ionic/components/select/select.ts b/ionic/components/select/select.ts index c2fd40ed4b..73ee70f51a 100644 --- a/ionic/components/select/select.ts +++ b/ionic/components/select/select.ts @@ -181,7 +181,7 @@ export class Select { */ @HostListener('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 let alertOptions = merge({}, this.alertOptions);