Featoff = can.Model.extend("featoff",{
findAll: {
url: '/api.php/specialoffers?',
type: 'GET',
data: { max : 10 , pid : 977 , sid : 5934 }
}
}, {});
Feat = can.Control({ init: function()
{ var that = this; can.view('images/js/mn/temps/featured.ejs', featoff.findAll({}).then(function(d)
{ return { offerdata : d, secTitle : that.element.data('title') }; })).done(function(frag)
{ that.element.html(frag); }) }});
I am calling this using new Feat();
this is working now. So now I wanna reuse the same Feat control with different set of parameters in the findAll, How can i do so? What method to use and how to use?? also can I also defer or override the can.view for the same ??
Can I also have a single Base controller and just keep overriding the parameters?