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
P4A relatively minor issue that is not relevant to core functionsfeatureLabel used to distinguish feature request from other issuesneeds: discussionFurther discussion with the team is needed before proceeding
Have you tried binding it to some property of the component that is calling it?
You can use an object (not a primitive type) and pass it to the dialog to initialize it (dialogRef.componentInstance.instanceObj = this.callingComponentObj), then if, inside the dialog, you bind the controls (with [(ngModel)], for example) to the attributes of the dialog's instanceObj, any change you do to them will be reflected in calling component's callingComponentObj and can be used in future calls to the dialog. If this dialog is called accross the app, you can think of a service to host callingComponentObj.
Binding inputs is not a problem. In my case the UI inside of dialog is, let's say "expensive", e.g. multiple interactive maps. Building the dialog content UI every time is not very effective, I would need just to hide or show it.
Reacted by SelfishLucho, Karol Depka Pradzinski, Aidan Zhakypov, James Barrow and Sumanth Chinthagunta
Please increase the priority. I don't think this is minor. My dialog has expensive components inside (Google Maps) and every time the dialog is opened, the app progressively slows down, down to a crawl...
Reacted by Ania, AlexKhymenko, William Luc Ritchie, Vassiliki D., Alberto Naperi Jr., James Barrow, Sumanth Chinthagunta and Xinan
Much need feature , I have child components inside the dialog window , for with previous instance and values are needed , I would be better just to hide and open the dialog instead of passing the reference each time it opens dialog
P4A relatively minor issue that is not relevant to core functionsfeatureLabel used to distinguish feature request from other issuesneeds: discussionFurther discussion with the team is needed before proceeding
Activity
julianobrasil commentedon Jun 16, 2017
Have you tried binding it to some property of the component that is calling it?
You can use an object (not a primitive type) and pass it to the dialog to initialize it (
dialogRef.componentInstance.instanceObj = this.callingComponentObj), then if, inside the dialog, you bind the controls (with[(ngModel)], for example) to the attributes of the dialog'sinstanceObj, any change you do to them will be reflected in calling component'scallingComponentObjand can be used in future calls to the dialog. If this dialog is called accross the app, you can think of a service to host callingComponentObj.MaximeAnsquer commentedon Jun 16, 2017
Nice idea, I will try that.
Thanks !
moravcik commentedon Aug 7, 2017
Binding inputs is not a problem. In my case the UI inside of dialog is, let's say "expensive", e.g. multiple interactive maps. Building the dialog content UI every time is not very effective, I would need just to hide or show it.
karol-depka commentedon Sep 12, 2017
Please increase the priority. I don't think this is minor. My dialog has expensive components inside (Google Maps) and every time the dialog is opened, the app progressively slows down, down to a crawl...
willshowell commentedon Sep 13, 2017
@karol-depka, there is a "P3" duplicate at #6206. The official consensus seems to be:
It's open for community contribution if anyone cares to give it a shot!
smkart commentedon Aug 15, 2018
Much need feature , I have child components inside the dialog window , for with previous instance and values are needed , I would be better just to hide and open the dialog instead of passing the reference each time it opens dialog
xmlking commentedon Jan 30, 2019
Chat-Bot Dialog/Popup is potential examples for this use case.
julianobrasil commentedon Jan 30, 2019
@willshowell submited an already merged PR about this topic: #14772.
jelbourn commentedon Nov 7, 2019
Closing since
MatDialogRefsupports this now (via CSS classes)angular-automatic-lock-bot commentedon Dec 8, 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.