Forgive me if I'm wrong but I think a good practice is to get this single item again from the server since this route could be accessed without going thru the list first.
If you don't want to do that for whatever reason, you could make your edit route a child from your list route. Then they could share data between their controllers or using resolve in an abstract state on top of them. I actually had to do this once. Let me know if you need me to elaborate on this. (I'm assuming you are using ui-router. Not sure if it's possible to do this with angular's router.) It would be nice to see some more ideas from other users as well. On Sat, Jul 18, 2015 at 7:48 PM, Leonan Luppi <leonan.lu...@gmail.com> wrote: > Hello, > > How can i get data from ng-model when i call new route. > > Example: > > I have a product CRUD (Create, read, update, delete) and two page, one > display <table> with datas and other to edit my single data (that I'll > select). > > On <table> tag, i have a route that redirect to edit page, how can i get > the row data and display in my edit page at inputs? > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to angular+unsubscr...@googlegroups.com. > To post to this group, send email to angular@googlegroups.com. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.