File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,15 @@ directory. In fact, you should have an example controller there already: ``hello
57
57
}
58
58
}
59
59
60
- Use the Twig functions from this bundle to activate your controllers:
60
+ Then, activate the controller in your HTML:
61
+
62
+ .. code-block :: html+twig
63
+
64
+ <div data-controller="hello">
65
+ ...
66
+ </div>
67
+
68
+ Optionally, this bundle has a Twig function to render the attribute:
61
69
62
70
.. code-block :: html+twig
63
71
@@ -166,10 +174,11 @@ actions & targets in your templates.
166
174
167
175
.. note ::
168
176
169
- Though this bundle provides these helpful functions/filters, it's recommended to
170
- use raw data attributes instead. If you use PhpStorm - you may want to install
171
- [Stimulus plugin](https://plugins.jetbrains.com/plugin/18940-stimulus) that will
172
- bring you nice autocompletion for them.
177
+ Though this bundle provides these helpful Twig functions/filters, it's
178
+ recommended to use raw data attributes instead, as they're simple enough.
179
+ If you use PhpStorm IDE - you may want to install
180
+ [Stimulus plugin](https://plugins.jetbrains.com/plugin/18940-stimulus)
181
+ to get nice auto-completion for the attributes.
173
182
174
183
stimulus_controller
175
184
~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments