Skip to content

Commit 2f73586

Browse files
committed
sidenav and lint
1 parent f3c097e commit 2f73586

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/lib/input/input.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,19 +119,19 @@ export class MdInput implements ControlValueAccessor, AfterContentInit, OnChange
119119
*/
120120
@Input('aria-label') ariaLabel: string;
121121
@Input('aria-labelledby') ariaLabelledBy: string;
122-
122+
123123
private _ariaDisabled: boolean;
124124
private _ariaRequired: boolean;
125125
private _ariaInvalid: boolean;
126-
126+
127127
@Input('aria-disabled')
128128
get ariaDisabled(): boolean { return this._ariaDisabled; }
129129
set ariaDisabled(value) { this._ariaDisabled = coerceBooleanProperty(value); }
130-
130+
131131
@Input('aria-required')
132132
get ariaRequired(): boolean { return this._ariaRequired; }
133133
set ariaRequired(value) { this._ariaRequired = coerceBooleanProperty(value); }
134-
134+
135135
@Input('aria-invalid')
136136
get ariaInvalid(): boolean { return this._ariaInvalid; }
137137
set ariaInvalid(value) { this._ariaInvalid = coerceBooleanProperty(value); }

src/lib/sidenav/sidenav.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import {
1717
} from '@angular/core';
1818
import {CommonModule} from '@angular/common';
1919
import {Dir, MdError} from '@angular2-material/core';
20+
import {coerceBooleanProperty} from '../core/coersion/boolean-property';
21+
2022

2123
/** Exception thrown when two MdSidenav are matching the same side. */
2224
export class MdDuplicatedSidenavError extends MdError {
@@ -78,9 +80,7 @@ export class MdSidenav {
7880
@Input()
7981
get opened(): boolean { return this._opened; }
8082
set opened(v: boolean) {
81-
// TODO(jelbourn): this coercion goes away when BooleanFieldValue is removed.
82-
let booleanValue = v != null && `${v}` !== 'false';
83-
this.toggle(booleanValue);
83+
this.toggle(coerceBooleanProperty(v));
8484
}
8585

8686

0 commit comments

Comments
 (0)