mercredi 10 février 2021

Ember dynamically add a component to another route when form is submitted

I'm very new to Ember and I'm trying to make this small app. I have a form where the user uploads a picture from his computer and inputs a name. Upon clicking the submit button, the user should get redirected to another route where a list of his uploaded pictures with their name will be displayed as cards, sort of. I created the "card" component, but I don't know how to make it so that the component will be rendered only when the user submits the form. The "card" should be generated upon submitting the form and possibly stay on the route, and if the form is submitted again, it will generate another card next to the first one. Is there a way how to do it, either directly with Ember or with JavaScript etc.? Thank you.




Aucun commentaire:

Enregistrer un commentaire