Reputation: 313
I want create an application using symfony2 in server side and angularJs in client side. I create a restful api with friendsofsymfony but I still doesn't know how can I consume the Json data generated by the api with angular. I found in some tutorials that I can split the two part of the project and so I should now create a simple HTML project with AngularJS. But I still have no idea how can I do this!
Can someone help me please with some instructions or examples?
Upvotes: 0
Views: 278
Reputation: 159
It's not so difficult. Two files backend and frontend.
Backend: you should install symfony, setup it, create controller. In controller setup route with request method(for youe wish get, post, put delete).
Frontend: (if you know little bit angularjs) create main mod, create controller and by $http send request to your symfomy's controller and get your data.
P.s. And don't forget read about serializer. It's so much important!!!
More detail you can read here.
Upvotes: 1