B
B
BonBon Slick2018-02-02 22:03:52
Vue.js
BonBon Slick, 2018-02-02 22:03:52

Rendering app.js on the backend?

Such a situation:
Controller

function somePage()
{
return $this->render('twig_tempalte');
}

twig_template
<html>
<head>
<head>

<body id="vue-app">

<some-component :some-data={% server_variable %}>
</some-component>

<script src="app.js">
</body>

</html>

It turns out that from the controller I issue a template in which the Vue.js components lie.
I would like to know options on how to save the client side from rendering, as if giving only a Twig template, a ready-made DOM rendered on the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2018-02-02
@BonBonSlick

https://habrahabr.ru/post/334952/
well, or remove vue and rewrite the entire front of the project

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question