When working with a feature in an existing Ember app, I needed to now what controller Ember expects. I had a form using Dockyard’s super cool EasyForm, but every time I submitted the form, the console would yell at me saying that my controller didn’t handle the action.
After hours of reading docs and trying to understand how the controller was wired up for this form, a coworker had the perfect solution.
Place that code in your template and it will print what controller that template is tied to.
I think of this as similar to Ruby’s
debug method, where I can print out data in the view so I can try and diagnose errors I don’t understand.
It’s not a great solution. Some sort of proper debugging method would be way more helpful, but it works for now.
If you know of a better way, please let me know.