You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[dialog] improved api for knowing state of all dialogs #6272
I have a "top priority" dialog that should dismiss all other dialogs before opening. In order to know when no other dialogs are open, I have to access a docs-private property, _openDialogs:
openImportantDialog(){// Start closing each of the open dialogsthis.dialog.closeAll();// When all dialogs are closed, open the important dialogthis.noDialogsOpen.first().subscribe(()=>{this.dialog.open(MyImportantDialog);});}/** Emits when no dialogs are open */getnoDialogsOpen(): Observable<void>{if(this.dialog._openDialogs.length){returnthis.dialog.afterAllClosed;}else{returnthis.dialog.afterAllClosed.startWith(null);}}
Overall sounds good, we should do both of those things.
In making _openDialogs public, I'd want to add an id property to the the MdDialogConfig and MdDialogRef (use the config ID on open if it exists, otherwise generate one). Maybe also a getDialogById method. This will make it easier to get at specific dialog instances.
Activity
jelbourn commentedon Aug 4, 2017
Overall sounds good, we should do both of those things.
In making
_openDialogspublic, I'd want to add anidproperty to the theMdDialogConfigandMdDialogRef(use the config ID on open if it exists, otherwise generate one). Maybe also agetDialogByIdmethod. This will make it easier to get at specific dialog instances.feat(dialog): open dialog API improvements
feat(dialog): open dialog API improvements
feat(dialog): open dialog API improvements
feat(dialog): open dialog API improvements
feat(dialog): open dialog API improvements (#6289)
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.