Skip to content

Commit 384c7fd

Browse files
authored
Apply comments after the review
1 parent 92228c1 commit 384c7fd

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/StimulusBundle/doc/index.rst

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,15 @@ directory. In fact, you should have an example controller there already: ``hello
5757
}
5858
}
5959
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:
6169

6270
.. code-block:: html+twig
6371

@@ -166,10 +174,11 @@ actions & targets in your templates.
166174

167175
.. note::
168176

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.
173182

174183
stimulus_controller
175184
~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)