It’s maybe a newbie question but I’m looking for a solution since this morning.
I’ve two inputs, and I want to add or remove a class when the focus, or the blur is triggered.
But when I try do do this, it seems that the DOM isn’t loaded and the inputs doesn’t exist.
Here in Ember land, we frown upon relying on jQuery to do thing. In fact, starting from Ember 2.9, jQuery became optional with ember-native-dom-event-dispatcher
Everything in Ember is all about Route and Template, with a little Component sprinkled here and there.
Route#renderTemplate doesn’t ACTUALLY renders the template. It schedules the rendering of templates. It’s the hook that let you manually invoke Route#render. Again, this doesn’t actually renders it. It does the scheduling.
The right design for this is to use the built-in {{input}} helper to dispatch action to your controller. Use controller’s action handler to set a property there, then bind the property down to the template. We call it DDAU (Data Down, Actions Up).