Look at this example, which is on your repo index page:
<div data-controller="hello">
<input data-target="hello.name" type="text">
<button data-action="click->hello#greet">Greet</button>
<span data-target="hello.output"></span>
</div>
This "framework" should be capable of detecting the current controller, since the click function is happening inside my controller scope, then call the method "hello" in that scope.
hello#get + data-controller="hello" just why?
Because scopes may be nested or intermingled with other scopes.
<div data-controller="hello goodbye">
<button data-action="hello#respond">Say Hello</button>
<button data-action="goodbye#respond">Say Goodbye</button>
</div>
This "framework" decided to avoid possible ambiguity by requiring an explicit and consistent naming convention.
Most helpful comment
Because scopes may be nested or intermingled with other scopes.
This "framework" decided to avoid possible ambiguity by requiring an explicit and consistent naming convention.