Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinayuangao committed Oct 26, 2016
1 parent 0386bdd commit 01a8190
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/lib/checkbox/checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from '@angular/core';
import {CommonModule} from '@angular/common';
import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms';
import {MdRippleModule, coerceBooleanProperty} from '../core';
import {BooleanFieldValue, MdRippleModule} from '../core';

/**
* Monotonically increasing integer used to auto-generate unique ids for checkbox components.
Expand Down Expand Up @@ -90,24 +90,15 @@ export class MdCheckbox implements ControlValueAccessor {
@Input() id: string = `md-checkbox-${++nextId}`;

/** Whether the ripple effect on click should be disabled. */
private _disableRipple: boolean = false;

@Input()
get disableRipple() { return this._disableRipple; }
set disableRipple(v) { this._disableRipple = coerceBooleanProperty(v); }
@Input() @BooleanFieldValue() disableRipple: boolean = false;

/** ID to be applied to the `input` element */
get inputId(): string {
return `input-${this.id}`;
}

/** Whether the checkbox is required or not. */
private _required: boolean;

/** Whether the checkbox is required or not. */
@Input()
get required(): boolean { return this._required; }
set required(value) { this._required = coerceBooleanProperty(value); }
@Input() @BooleanFieldValue() required: boolean = false;

/** Whether or not the checkbox should come before or after the label. */
@Input() align: 'start' | 'end' = 'start';
Expand Down

0 comments on commit 01a8190

Please sign in to comment.