Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to use loadPartials properly without renderContext?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Maciej Mazur  
View profile  
 More options Oct 10 2012, 6:26 am
From: Maciej Mazur <maciejmazur.m...@gmail.com>
Date: Wed, 10 Oct 2012 03:26:01 -0700 (PDT)
Local: Wed, Oct 10 2012 6:26 am
Subject: How to use loadPartials properly without renderContext?

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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Maciej Mazur  
View profile  
 More options Oct 15 2012, 3:57 am
From: Maciej Mazur <maciejmazur.m...@gmail.com>
Date: Mon, 15 Oct 2012 00:57:14 -0700 (PDT)
Local: Mon, Oct 15 2012 3:57 am
Subject: Re: How to use loadPartials properly without renderContext?

Hey,

it was fixed here: https://github.com/quirkey/sammy/issues/161

Thanks

W dniu środa, 10 października 2012 12:26:01 UTC+2 użytkownik Maciej Mazur
napisał:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »