I was wondering how one might solve the following problem in Ember.js: I'm implementing a kind of a dashboard UI, filled with all different kinds of chart widgets. So, I have a list of ui-widget in my WidgetsController which I want to render on the screen.
The problem is each widget has a different template and should probably have a different controller, etc.
So I guess my question is how do you iterate over a list and render each item with a different controller/template.
Or if you can't, how would you deal with this sort of problem - rendering a list of different kinds of things?
Thanks!
You should check out ember ContainerView.
You do not need Handlebars to invoke the creation of your Components and add them to your View. Take a look at my example here:
http://emberjs.jsbin.com/pisay/1/edit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With