`Template.foo.rendered` does not work #136

DirkStevens opened this Issue Feb 22, 2013 · 2 comments

2 participants


I put a "ask" blade view in a the "client/views" folder.
I defined a small head.blade view.
I did not define a body.blade view.

In Meteor.startup the template is added to the body:




This works.

When I define a rendered handler - I get a crash. (This handler works in the original Handlebars equivalent template)

Template["client/views/ask"].rendered = function() {




It looks like this is not referring to the template's DOM now but to the template function:

tmpl_data: Object
events: Object
helpers: function (helperMap) {
preserve: function (preserveMap) {
rendered: function () {
: Object

Anyone knows what's going on?

@bminer bminer was assigned Mar 2, 2013

This is caused by the Blade smart package thinking that the rendered callback is actually a view helper. As it stands, view helpers are called when a view is rendered. This behavior needs to be changed. I wonder how Handlebars works in Meteor? I will do some research...


See the Meteor smart package file (package.js) to correct this bug.

@bminer bminer added a commit that closed this issue Mar 6, 2013
@bminer Fixed a bunch of Meteor stuff:
- Cleaned up Meteor `package.js` file to fix `require("blade")` hacks. Should fix #144.
- Now considering `client/views` folder to be in the root namespace. Closes #143.
- Fixed view helpers. They can now be used just like view locals. Also closes #136.
Push to version 3.0.0beta8
@bminer bminer closed this in a050d0d Mar 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment