Skip to content

Commit 710890e

Browse files
committed
sidenav and lint
1 parent ba56f11 commit 710890e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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 '../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 {
@@ -80,9 +82,7 @@ export class MdSidenav {
8082
@Input()
8183
get opened(): boolean { return this._opened; }
8284
set opened(v: boolean) {
83-
// TODO(jelbourn): this coercion goes away when BooleanFieldValue is removed.
84-
let booleanValue = v != null && `${v}` !== 'false';
85-
this.toggle(booleanValue);
85+
this.toggle(coerceBooleanProperty(v));
8686
}
8787

8888

0 commit comments

Comments
 (0)