@@ -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
@@ -106,8 +106,8 @@ export class MatDialogRef<T, R = any> {
106106 take ( 1 )
107107 )
108108 . subscribe ( ( ) => {
109- this . _beforeClose . next ( dialogResult ) ;
110- this . _beforeClose . complete ( ) ;
109+ this . _beforeClosed . next ( dialogResult ) ;
110+ this . _beforeClosed . complete ( ) ;
111111 this . _overlayRef . detachBackdrop ( ) ;
112112 } ) ;
113113
@@ -117,8 +117,8 @@ export class MatDialogRef<T, R = any> {
117117 /**
118118 * Gets an observable that is notified when the dialog is finished opening.
119119 */
120- afterOpen ( ) : Observable < void > {
121- return this . _afterOpen . asObservable ( ) ;
120+ afterOpened ( ) : Observable < void > {
121+ return this . _afterOpened . asObservable ( ) ;
122122 }
123123
124124 /**
@@ -131,8 +131,8 @@ export class MatDialogRef<T, R = any> {
131131 /**
132132 * Gets an observable that is notified when the dialog has started closing.
133133 */
134- beforeClose ( ) : Observable < R | undefined > {
135- return this . _beforeClose . asObservable ( ) ;
134+ beforeClosed ( ) : Observable < R | undefined > {
135+ return this . _beforeClosed . asObservable ( ) ;
136136 }
137137
138138 /**
@@ -184,6 +184,24 @@ export class MatDialogRef<T, R = any> {
184184 return this ;
185185 }
186186
187+ /**
188+ * Gets an observable that is notified when the dialog is finished opening.
189+ * @deprecated Use `afterOpened` instead.
190+ * @deletion -target 8.0.0
191+ */
192+ afterOpen ( ) : Observable < void > {
193+ return this . afterOpened ( ) ;
194+ }
195+
196+ /**
197+ * Gets an observable that is notified when the dialog has started closing.
198+ * @deprecated Use `beforeClosed` instead.
199+ * @deletion -target 8.0.0
200+ */
201+ beforeClose ( ) : Observable < R | undefined > {
202+ return this . beforeClosed ( ) ;
203+ }
204+
187205 /** Fetches the position strategy object from the overlay ref. */
188206 private _getPositionStrategy ( ) : GlobalPositionStrategy {
189207 return this . _overlayRef . getConfig ( ) . positionStrategy as GlobalPositionStrategy ;
0 commit comments