DeborahK / Angular-NgRx-GettingStarted

Materials for our Pluralsight course: Angular NgRx: Getting Started: http://bit.ly/AngularNgRx.
MIT License
545 stars 724 forks source link

How to bring product-edit on Modal #56

Open BrenoSaith opened 1 year ago

BrenoSaith commented 1 year ago

Hi Deborah/Duncan. I have a small question and I need your help.

I want to open the product-edit.component in a modal instead of opening next to the list.

In a few steps, how could I do this since the shell.component contains the list of products and the edit form?

I tried to use NgbModel but I believe I'm doing something wrong.

duncanhunter commented 1 year ago

Hi

This should not be NgRx specific.

You should be able to pass the data to the modal (depending on the modal library/approach), do the edit then get the result from the modal when you close it. Alternatively, you could subscribe to the store and dispatch an update action in the modal component.

Might be best to raise an issue on their modal repository or StackOverflow for help.