File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1- import { Component , Inject } from '@angular/core' ;
2- import { DOCUMENT } from '@angular/platform-browser' ;
1+ import { Component , Inject } from '@angular/core' ;
2+ import { DOCUMENT } from '@angular/platform-browser' ;
33import { MdDialog , MdDialogRef , MdDialogConfig } from '@angular/material' ;
44
55@Component ( {
Original file line number Diff line number Diff line change @@ -22,17 +22,22 @@ import {MdDialogContainer} from './dialog-container';
2222@Injectable ( )
2323export class MdDialog {
2424 private _openDialogsAtThisLevel : MdDialogRef < any > [ ] = [ ] ;
25+ private _afterAllClosedAtThisLevel = new Subject < void > ( ) ;
26+ private _afterOpenAtThisLevel = new Subject < MdDialogRef < any > > ( ) ;
2527
2628 /** Keeps track of the currently-open dialogs. */
2729 get _openDialogs ( ) : MdDialogRef < any > [ ] {
2830 return this . _parentDialog ? this . _parentDialog . _openDialogs : this . _openDialogsAtThisLevel ;
2931 }
3032
3133 /** Subject for notifying the user that all open dialogs have finished closing. */
32- private _afterAllClosed = new Subject < void > ( ) ;
33-
34+ get _afterOpen ( ) : Subject < MdDialogRef < any > > {
35+ return this . _parentDialog ? this . _parentDialog . _afterOpen : this . _afterOpenAtThisLevel ;
36+ }
3437 /** Subject for notifying the user that a dialog has opened. */
35- private _afterOpen = new Subject < MdDialogRef < any > > ( ) ;
38+ get _afterAllClosed ( ) : Subject < void > {
39+ return this . _parentDialog ? this . _parentDialog . _afterAllClosed : this . _afterAllClosedAtThisLevel ;
40+ }
3641
3742 /** Gets an observable that is notified when a dialog has been opened. */
3843 afterOpen : Observable < MdDialogRef < any > > = this . _afterOpen . asObservable ( ) ;
You can’t perform that action at this time.
0 commit comments