-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #110 Adding a simpler syntax for single stimulus controller e…
…lements (weaverryan) This PR was merged into the main branch. Discussion ---------- Adding a simpler syntax for single stimulus controller elements Having 1 controller per element is the main use-case. This makes that a bit nicer to do :). ```twig <div {{ stimulus_controller('chart', { 'name': 'Likes', 'data': [1, 2, 3, 4] }) }}> Hello </div> ``` Also, this makes working with controllers that don't have any values (yet) MUCH nicer: ```twig <!-- before --> {{ stimulus_controller({ 'chart': {} }) }} <!-- now --> {{ stimulus_controller('chart') }} ``` Cheers! Commits ------- 773ead9 adding a simpler syntax for single stimulus controller elements
- Loading branch information
Showing
3 changed files
with
64 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters