-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MdDialog passing in data and or variables to modal #2552
Comments
There is a pull request to make it easier In the mean time #1377 (comment) |
@antonyRoberts is right. I'll close this issue as a duplicate of #2181. |
Hi @crisbeto and @antonyRoberts ... I have been working through it and I notice that the way the example API shows how to do the diaglog there is a 2 component system. *** I don't like this methodology... The issue with that is accessing the class to fire the modal popup is probably the same class that has the data you need to access too... not to say there aren't ways to get around this but the point is still a concern. So what I did is pointed it to the same class. This works per se but now I can't set the data. For example...
this is fine but what if I want to access data... i.e.
^^^^^ I can't do this. perhaps I am doing something wrong but any help would be appreciated. Should I post this in the other issue forum? #2181 ***Update... to the above concern I wish the modal pop would accomplish these things:
|
Not sure I get the issue @xtianus79. Can you post what your classes look like? |
@crisbeto it is pretty straight forward...
}
} I would like for this >>>> selectedOption: any = this.openMessage(); to work but i get a typescript error that I am not matching in the function... i.e. errorMsg: string isn't being passed in... |
Not sure where the |
@crisbeto you mean like dialogRef.ApiHelper ??? |
No, literally |
MMMMMMMMM.... @crisbeto You SIR... ARE THE MAN!!!! lol. ughhh understanding API's always helps! I appreciate your help that did the trick...
I have to clean this up a lot but i will repost on plunkr to show what I did... Again thanks!! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug, feature request, or proposal:
Passing things into the second component seems obscure. I can't readily pass in values to the second component to display on modal popup.
What is the expected behavior?
When the modal popup is displayed... information such as variables will display accordingly {{data.here}}
What is the current behavior?
Not working
What are the steps to reproduce?
pass in variables to the new value
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd
https://plnkr.co/edit/dhZ4UldIlQKDPvrjJP2f?p=preview <<< this is example from Material
What is the use-case or motivation for changing an existing behavior?
To be able to pass in data / variables to the modal dialog popup upon request.
Which versions of Angular, Material, OS, browsers are affected?
Angular 2.4.1
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: