I have an Ember.js route like this:
this.route 'doc', path: '/docs/:doc'
And I need to set the template based on the :doc param. How can I achieve this?
Thanks.
I have an Ember.js route like this:
this.route 'doc', path: '/docs/:doc'
And I need to set the template based on the :doc param. How can I achieve this?
Thanks.
Maybe you could try something like this:
App.DocView = Ember.View.extend({
render : function(buffer){
var context = this.get("context.content");
this.set("templateName", context);
this._super(buffer);
}
});
Link to Fiddle: http://jsfiddle.net/mavilein/DQ8gS/2/