I have this situation in which I have the template-name stored in a variable. I noticed that if you have for example
var config = { view: "PeopleView", .... } ;
that you can't do
{{view App[config.view]}}
If this is possible, I'm still interested in the solution! Anyway, I decided to fix this with a Handlebars helper:
{{setVariableView config}}
...
Ember.Handlebars.registerBoundHelper('setVariableView', function(value, options) {
return App[value.view].create(value) ; // <-- this doesn't work :)
}) ;
At this point I don't know how to call the compiled PeopleView ? Any suggestions ?
Cheers