File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -367,6 +367,36 @@ export class MdSidenavContainer implements AfterContentInit {
367
367
this . _validateDrawers ( ) ;
368
368
}
369
369
370
+ /** Calls `open` of both start and end sidenavs */
371
+ public open ( ) {
372
+ const promises : Promise < MdSidenavToggleResult > [ ] = [ ] ;
373
+
374
+ if ( this . _start ) {
375
+ promises . push ( this . _start . open ( ) ) ;
376
+ }
377
+
378
+ if ( this . _end ) {
379
+ promises . push ( this . _end . open ( ) ) ;
380
+ }
381
+
382
+ return Promise . all ( promises ) ;
383
+ }
384
+
385
+ /** Calls `close` of both start and end sidenavs */
386
+ public close ( ) {
387
+ const promises : Promise < MdSidenavToggleResult > [ ] = [ ] ;
388
+
389
+ if ( this . _start ) {
390
+ promises . push ( this . _start . close ( ) ) ;
391
+ }
392
+
393
+ if ( this . _end ) {
394
+ promises . push ( this . _end . close ( ) ) ;
395
+ }
396
+
397
+ return Promise . all ( promises ) ;
398
+ }
399
+
370
400
/**
371
401
* Subscribes to sidenav events in order to set a class on the main container element when the
372
402
* sidenav is open and the backdrop is visible. This ensures any overflow on the container element
You can’t perform that action at this time.
0 commit comments