Skip to content

Using Stimulus controller with live-component #687

Closed
@fajino17

Description

@fajino17

I've read discussion on this issue #527, but I do not clearly understand what means 'put controller around root element'.
Something like this?

<div data-controller="custom-controller">
<div{{attributes}}></div> -- live component root
</div>

also

div {{ attributes.add(stimulus_controller('custom-controller', { someValue: 'foo' })) }}> -- live component root

#https://symfony.com/bundles/ux-live-component/current/index.html#working-with-the-component-in-javascript
I couldn't make none of these working.
Can somebody explain this for me. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions