Skip to content

Commit 8b71743

Browse files
authored
Update vuejs.rst
1 parent 4d9f059 commit 8b71743

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

frontend/encore/vuejs.rst

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,19 @@ you can import them with ``require()`` function:
158158
Embeded with Twig
159159
-----------------
160160

161-
You can of course, inside a Twig template rendered
162-
from a controller, instantiate a VueJS app.
163-
Tip: you may in this case leverage the delimiters options
164-
https://vuejs.org/v2/api/#delimiters to not overlap with Twig ones.
161+
You can of course, inside a Twig template rendered from a controller,
162+
instantiate a Vue.js app as any other JavaScript code.
163+
164+
.. tip::
165+
166+
You may in this case leverage the delimiters options
167+
to not overlap with Twig ones.
168+
For example, using `delimiters: ['${', '}']`
169+
170+
.. code-block:: twig
171+
172+
{{ twig_var }} renders a Twig variable
173+
${ vuejs_var }} renders a Vue.js variable
165174
166175
.. _`Vue.js`: https://vuejs.org/
167176
.. _`vue-loader options`: https://vue-loader.vuejs.org/options.html

0 commit comments

Comments
 (0)