Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug?] BlazeLayout renders Blaze template before Polymer has finished rendering #39

Open
ghost opened this issue Aug 4, 2015 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 4, 2015

I'm not sure if this is intended to work, but if you render a template using

FlowRouter.route('/myRoute', {
    action: function () {
        BlazeLayout.render("masterLayout", {main: "myTemplate"});
    }
});

and myTemplate includes Polymer 1.0 elements, myTemplate is rendered before some of the Polymer elements have been attached. This might be solved by using one of Flow-Router's triggers to call Polymer to pre-render (possibly using Polymer's distributeContent function) and then waiting for a 'success' callback before then rendering myTemplate. Currently, it seems Polymer and Blaze are trying to render at the same time. Thanks a lot for looking into this - appreciate the help.

@fakenickels
Copy link

Have you tried to call Polymer pre-render at Template.myTemplate.onRendered/onCreated?

@ghost
Copy link
Author

ghost commented Aug 4, 2015

No - I was looking for a function like that in the Polymer docs. I didn't see pre-render in the API reference list either - can you point me to it? Thanks a lot for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant