Emberjs is able to uptade automagically the view when the model is loaded. For example, with the following template
{{#each controller}}
{{name}}
{{each}}
the view is updated each time a model in the controller is loaded.
But, what if we need to implement a custom view that does not support such feature. Precisely, I need a view that render a graphic chart. I use some third party library for that. The data that I have in my controller represent some points that my view should render as a chart. Usually with these third party library we need to set the data and then call the draw function.
The problem is that when I just bind my controller.model to my chart data, the chart have no idea if these data are really loaded and the draw function crashes. So I think, I need some observers somewhere but I can't figure out where to put it. My attempt is to observer controller.model.isLoaded and call draw when it changes. But it just works once, and when I go back and forth on my route, the draw is no more called because the model are all loaded.