S
S
semki0962016-05-08 10:24:43
JavaScript
semki096, 2016-05-08 10:24:43

How to pass data from database to JS framework model?

This is how things stand now. I make a request to the database, get the data and pass it to the controller as a PHP array. In the controller, I convert the array to a string and put it in a variable. Now this variable must be converted into a js variable and you can work. But it seems to me that I'm doing something wrong, some kind of chain is long, how is it done correctly? How to organize the work of, say, knockout.js with some kind of php framework - basically the question concerns receiving data and exchanging data (if such an exchange is needed at all, I haven’t figured it out yet).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2016-05-08
@SilenceOfWinter

Everything is done right.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question