I'm trying to create a CRUD system on a list and I need to pass the list from the controller of spring to ANGULARJS controller. Can someone point to the right direction pls? P.S: I already can receive the list and I can manipulate it in EL language
-
it maybe easier to answer you question, if you have a concrete questionJaiwo99– Jaiwo992016-01-28 15:25:13 +00:00Commented Jan 28, 2016 at 15:25
-
Well I just need someone to point to the right directionOddDev– OddDev2016-01-28 15:40:29 +00:00Commented Jan 28, 2016 at 15:40
-
Maybe to make you understand, I need to send a list from spring controller and then receive in the jsp page with angularjsOddDev– OddDev2016-01-28 15:41:35 +00:00Commented Jan 28, 2016 at 15:41
Add a comment
|
2 Answers
You need to use some JSON necoding library and let it encode your objects when you return them from your controller. Jackson might help.
4 Comments
OddDev
Thanks, so I need to set the response as Json in spring controller?
OddDev
And while we're at it, can you tell me how to receive it in angularjs controller, cause it's driving me nuts
ACV
You need to define an object in terms of angular. Try this: medium.com/opinionated-angularjs/…
OddDev
Thanks a lot for your help
I am an Angular developer and I work with a Spring Java team.
I believe they use Spring BOOT
http://projects.spring.io/spring-boot/
Spring BOOT produces RESTful APIs and our Angular application makes HTTP requests to those APIs and Spring returns JSON responses.
1 Comment
OddDev
Thank you for your reply, but what I found was that if the Jackson api is set in the path, SPRING will detect it and it will parse the response as JSON automatically.