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
As of now, it is not possible to pass over parameters to the modal service, when opening a component as content.
This is a common concept in other frameworks, when it comes to outsource modals into components.
Let's assume, I have a modal which requires specific parameters to render properly and to make sense. For example an edit modal, which should already have data provided.
I would have to do something like this:
let modalRef = modalService.open(ModalComponent);
modalRef.instance.parameterA = "valueA";
modalRef.instance.parameterB = "valueB";
Instead I would like to do it in that way:
modalService.open(ModalComponent, {parameterA: "valueA", parameterB: "valueB"});
Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)
Current version
Is there anything else we should know?
If you agree with this proposal, I can also do a pull request for that.
The text was updated successfully, but these errors were encountered:
hi @ignipae, thanks for playing with the library. Go ahead and open a PR if you already explored this issue. Would you mind even adding an example on the modal's playground page? It would be useful for other developers to have a snippet.
Yeah Angular Material implements this. How about just adding a data object that is then passed over? What do you think @mikerodonnell89 ? Should be a pretty quick PR.
Alternatively, if you want to open a PR @ignipae feel free, we'll use all the help we can get!
ignipae
added a commit
to ignipae/fundamental-ngx
that referenced
this issue
Jan 21, 2019
Is this a bug, enhancement, or feature request?
Feature request
Briefly describe your proposal.
As of now, it is not possible to pass over parameters to the modal service, when opening a component as content.
This is a common concept in other frameworks, when it comes to outsource modals into components.
Let's assume, I have a modal which requires specific parameters to render properly and to make sense. For example an edit modal, which should already have data provided.
I would have to do something like this:
let modalRef = modalService.open(ModalComponent);
modalRef.instance.parameterA = "valueA";
modalRef.instance.parameterB = "valueB";
Instead I would like to do it in that way:
modalService.open(ModalComponent, {parameterA: "valueA", parameterB: "valueB"});
Which versions of Angular and Fundamental NGX are affected? (If this is a feature request, use current version.)
Current version
Is there anything else we should know?
If you agree with this proposal, I can also do a pull request for that.
The text was updated successfully, but these errors were encountered: