@@ -31,13 +31,13 @@ export class MatDialogRef<T, R = any> {
3131 disableClose : boolean | undefined = this . _containerInstance . _config . disableClose ;
3232
3333 /** Subject for notifying the user that the dialog has finished opening. */
34- private readonly _afterOpen = new Subject < void > ( ) ;
34+ private readonly _afterOpened = new Subject < void > ( ) ;
3535
3636 /** Subject for notifying the user that the dialog has finished closing. */
3737 private readonly _afterClosed = new Subject < R | undefined > ( ) ;
3838
3939 /** Subject for notifying the user that the dialog has started closing. */
40- private readonly _beforeClose = new Subject < R | undefined > ( ) ;
40+ private readonly _beforeClosed = new Subject < R | undefined > ( ) ;
4141
4242 /** Result to be passed to afterClosed. */
4343 private _result : R | undefined ;
@@ -60,8 +60,8 @@ export class MatDialogRef<T, R = any> {
6060 take ( 1 )
6161 )
6262 . subscribe ( ( ) => {
63- this . _afterOpen . next ( ) ;
64- this . _afterOpen . complete ( ) ;
63+ this . _afterOpened . next ( ) ;
64+ this . _afterOpened . complete ( ) ;
6565 } ) ;
6666
6767 // Dispose overlay when closing animation is complete
@@ -109,8 +109,8 @@ export class MatDialogRef<T, R = any> {
109109 take ( 1 )
110110 )
111111 . subscribe ( ( ) => {
112- this . _beforeClose . next ( dialogResult ) ;
113- this . _beforeClose . complete ( ) ;
112+ this . _beforeClosed . next ( dialogResult ) ;
113+ this . _beforeClosed . complete ( ) ;
114114 this . _overlayRef . detachBackdrop ( ) ;
115115 } ) ;
116116
@@ -120,8 +120,8 @@ export class MatDialogRef<T, R = any> {
120120 /**
121121 * Gets an observable that is notified when the dialog is finished opening.
122122 */
123- afterOpen ( ) : Observable < void > {
124- return this . _afterOpen . asObservable ( ) ;
123+ afterOpened ( ) : Observable < void > {
124+ return this . _afterOpened . asObservable ( ) ;
125125 }
126126
127127 /**
@@ -134,8 +134,8 @@ export class MatDialogRef<T, R = any> {
134134 /**
135135 * Gets an observable that is notified when the dialog has started closing.
136136 */
137- beforeClose ( ) : Observable < R | undefined > {
138- return this . _beforeClose . asObservable ( ) ;
137+ beforeClosed ( ) : Observable < R | undefined > {
138+ return this . _beforeClosed . asObservable ( ) ;
139139 }
140140
141141 /**
@@ -187,6 +187,24 @@ export class MatDialogRef<T, R = any> {
187187 return this ;
188188 }
189189
190+ /**
191+ * Gets an observable that is notified when the dialog is finished opening.
192+ * @deprecated Use `afterOpened` instead.
193+ * @deletion -target 8.0.0
194+ */
195+ afterOpen ( ) : Observable < void > {
196+ return this . afterOpened ( ) ;
197+ }
198+
199+ /**
200+ * Gets an observable that is notified when the dialog has started closing.
201+ * @deprecated Use `beforeClosed` instead.
202+ * @deletion -target 8.0.0
203+ */
204+ beforeClose ( ) : Observable < R | undefined > {
205+ return this . beforeClosed ( ) ;
206+ }
207+
190208 /** Fetches the position strategy object from the overlay ref. */
191209 private _getPositionStrategy ( ) : GlobalPositionStrategy {
192210 return this . _overlayRef . getConfig ( ) . positionStrategy as GlobalPositionStrategy ;
0 commit comments