Hello All,
I would like to pass in a parameter to a can.Component as the template to render or use a default view similar to what I can do with can.Control:
- can.Control.extend({
- defaults: {
- view: 'foo.mustache' // use this as default view unless I pass in another view through the options.
- }
- }, {
- init: function() {
- can.view(this.options.view)
- }
- });
- can.Component.extend({
- ...
- template: this.options.view, // something like this?
- ...
- });
Thanks,
Colin