Hey,
When I want to load partials using the loadPartials() at the start of the
route execution, I am left with "Sammy.Object: {} has no method
'loadPartials'" error. Shouldn't this method work similary to the load()
and automatically run on render context?
I can avoid the problem with weird dummy loads like this:
var app = Sammy('body', function(){
app.get('#/website/home', function(context){
this.load('someDummyFileJustToRunRenderContext.ms')
.loadPartials({
'heading': 'heading.ms',
'footer': 'footer.ms'
})
.render('realTemplate.ms')
.swap();
});
});
But of course this looks like a terrible solution. Shouldn't it work like
this:
var app = Sammy('body', function(){
app.get('#/website/home', function(context){
this.loadPartials({
'heading': 'heading.ms',
'footer': 'footer.ms'
})
.render('realTemplate.ms')
.swap();
});
});
What am I doing wrong?
Kind regards,
Maciej