3
3
Component ,
4
4
ContentChildren ,
5
5
ElementRef ,
6
- Host ,
7
6
HostBinding ,
8
7
Input ,
9
8
Optional ,
@@ -19,15 +18,13 @@ import {PromiseCompleter} from '@angular2-material/core/async/promise-completer'
19
18
import { MdError } from '@angular2-material/core/errors/error' ;
20
19
import { BooleanFieldValue } from '@angular2-material/core/annotations/field-value' ;
21
20
22
-
23
21
/** Exception thrown when two MdSidenav are matching the same side. */
24
22
export class MdDuplicatedSidenavError extends MdError {
25
23
constructor ( align : string ) {
26
24
super ( `A sidenav was already declared for 'align="${ align } "'` ) ;
27
25
}
28
26
}
29
27
30
-
31
28
/**
32
29
* <md-sidenav> component.
33
30
*
@@ -223,8 +220,6 @@ export class MdSidenav {
223
220
private _closePromiseReject : ( ) => void ;
224
221
}
225
222
226
-
227
-
228
223
/**
229
224
* <md-sidenav-layout> component.
230
225
*
@@ -263,12 +258,12 @@ export class MdSidenavLayout implements AfterContentInit {
263
258
private _left : MdSidenav ;
264
259
private _right : MdSidenav ;
265
260
266
- constructor ( @Optional ( ) @ Host ( ) private _dir : Dir , private _element : ElementRef ,
261
+ constructor ( @Optional ( ) private _dir : Dir , private _element : ElementRef ,
267
262
private _renderer : Renderer ) {
268
263
// If a `Dir` directive exists up the tree, listen direction changes and update the left/right
269
264
// properties to point to the proper start/end.
270
265
if ( _dir != null ) {
271
- _dir . dirChange . add ( ( ) => this . _validateDrawers ( ) ) ;
266
+ _dir . dirChange . subscribe ( ( ) => this . _validateDrawers ( ) ) ;
272
267
}
273
268
}
274
269
0 commit comments