jeudi 26 février 2015

Ember JS pass object as transitionTo parameter

I'm capturing information from a form in my app and then saving that in a JSON array of objects.


Here's a link to the pertinent code: http://ift.tt/1Ew9N5K


inputSubmit is the name of the method being run on form submission. the variables are getting the values stored in each text input from the form. the for in statement checks to see if the item already exists in the userList JSON array, which is where i store all the items the user is adding. it only contains user-submitted items and is empty by default.


as you can see from the snippet i've included, i'm able to pass the name added through the form to its own details page. on that page i want to simply show the user what information they've submitted.


the question is how do i pass the name, description and other info related to the unique item that i've created a page for. right now all i can get it to do is spit out a list of names of all the items and their information even though it creates the unique page correctly.


thanks!





Aucun commentaire:

Enregistrer un commentaire