S
S
Sergey Gnatyuk2018-05-02 18:45:26
PHP
Sergey Gnatyuk, 2018-05-02 18:45:26

How to properly render individual blocks if the page is generated by PHP?

Please tell me how to solve this problem.
For example, there is a page with a list of products and a small filter (price, manufacturer, etc.). Initially, the page layout is generated using PHP. Previously, I simply received ready-made HTML with Ajax and inserted it into the page. But how to do this using Vue, it also uses special attributes in HTML. The option to render a list of products after loading the page with an ajax request does not seem to be very successful. Is it possible to somehow combine the generation of the page with the help of puff and its further updating with the help of Vue?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan-s, 2018-05-02
@Yan-s

The initial data can be immediately passed to the template, output json as a string.
But if there are no good reasons, then it is better to receive data in one way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question