What would be the correct way of passing the starts_at attribute and keeping it up to date in this view? I would want it to be generic so that it would support something like
Yes, that would work. I was just wondering if there would be any way to do this without providing the view with an explicit template and just passing in a dynamic valueBinding inside a view
@dipeshgtm I’m just curious why you packed the initialization of the jQuery UI timepicker into a runloop (Ember.run.next)? are there any synchronization drawbacks when placing it directly into the didInsertElement hook?
I have failed to understand the Ember Runloop but I have read that it is a general practice to place external JS library codes inside Ember.run.next. As far as my understanding goes, I believe that it is not guaranteed that the DOM element on which the library binds has already been rendered by the time the code to select that DOM element is called. So, Ember.run.next would be scheduling it to run after the element has been inserted/rendered.
Either way, my understanding of the Ember.run is vague. I have read through “the popular” articles and slides on the internet, but I fail to understand how I can play around with things for myself and any real world case where it could be applied. Could you guys also direct me to any good in-depth articles/presentations on the subject?
And as far as this topic goes, I am just curious to how I would do something like this
and bind its changes to the actual starts_at and ends_at for my model.
I have found myself relying to firing observers that set properties on the model by passing a field name instead of a value/binding but it seems very unnatural to me.