C
C
caps.com2016-01-12 21:30:43
symfony
caps.com, 2016-01-12 21:30:43

SPA on and AngularJS and Symfony 2?

Hello.
Please advise how best to use the SPA concept. Mix js logic with Twig, Blade, etc. Or is it possible to separate the frontend entirely from the backend, making the backend purely REST ?
I rummaged through a bunch of material, but in the examples, the angular code mostly interferes with the template engine code, it seems to me that it looks like trash. But for some reason, this approach is used most often.
We do not take indexation problems into account yet, we are primarily interested in the approach to developing large projects and what pitfalls can be.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-01-12
@caps.com

Mix js logic with Twig, Blade, etc. Or is it possible to separate the frontend entirely from the backend, making the backend purely REST ?

Yes, the client is separate, the server is separate, between them is the HTTP API.
If you have issues with bootstrapping speed etc. then instead of "mixing" the template engine and angularjs (this is generally stupid), you can simply prepare the data when requesting a server and sew it into the page (forwarding everything through JS).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question