Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

md-dialog can no longer receive references to objects via locals or resolve #3651

@hodeyp

Description

@hodeyp

the change committed in bee0523 that fixes issue #2676 has broken 'md-dialog' ability to inject objects into the dialog.

I believe that locals & resolve functions that return an object should pass that object to the 'md-dialog' instead of a copy of that object. This is exactly how router libraries works with resolve/data functions. Also, I believe that the whole concept of angular injection is to pass the original reference into scope, not a copy.

In my use case, using angularfire for server synchronisation. If a user needs to change a record a dialog is shown with a form, user makes the change and then clicks save. The save returns a promise that then allows the object to be saved back to the firebase location. Because the promise is now returning a copy of the object instead of the original object the save method fails.

Please consider removing this commit from material.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions