Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: mention that controller references should be kebab-case on manual registration to avoid issues with targets #725

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/reference/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ import ReferenceController from "./controllers/reference_controller"
application.register("reference", ReferenceController)
```

Use kebab-case in references to ensure features like targets function correctly (i.e., controllers/date_picker_controller, DatePickerController, date-picker)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think, would it instead make sense to update the example above to include the kebab-case version?


You can also register a controller class inline instead of importing it from a module:

```js
Expand Down