chore(): fix host properties for MD components.

This commit is contained in:
Jeremy Elbourn
2015-04-23 13:15:20 -07:00
committed by Jeremy Elbourn
parent dff4795e49
commit b9eab463f7
9 changed files with 38 additions and 35 deletions

View File

@ -2,6 +2,7 @@ import {Component, View, Attribute} from 'angular2/angular2';
import {isPresent} from 'angular2/src/facade/lang';
import {KEY_SPACE} from 'angular2_material/src/core/constants'
import {KeyboardEvent} from 'angular2/src/facade/browser';
import {NumberWrapper} from 'angular2/src/facade/lang';
@Component({
selector: 'md-checkbox',
@ -34,12 +35,12 @@ export class MdCheckbox {
role: string;
/** Setter for tabindex */
tabindex: any;
tabindex: number;
constructor(@Attribute('tabindex') tabindex: string) {
this.role = 'checkbox';
this.checked = false;
this.tabindex = isPresent(tabindex) ? tabindex : '0';
this.tabindex = isPresent(tabindex) ? NumberWrapper.parseInt(tabindex, 10) : 0;
}
get disabled() {