Answer the question
In order to leave comments, you need to log in
How to work with frontend based on JS?
The backend returns the data as an array. I can display them in a standard loop. But if I want full-fledged interactivity of the frontend - do I understand correctly that I should convert this array to JSON and already work with it - for example, display it using the handelbars template engine? Or is it better to use php, and handelbars and json will be included later, for example for ajax requests?
There is another point - if the page is complex, then it probably makes sense to build a dom on the client, which means that I immediately need to convert the data to JSON, right? ps. If so - what is the best way to pass php variable (with json string) to js?
Answer the question
In order to leave comments, you need to log in
1. Google Rest API
2. Google client-side frameworks: Ember.js, Angular.js, etc.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question