Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Meteor: Template events and stuff doesn't work for included templates #139

Closed
bminer opened this Issue · 1 comment

1 participant

@bminer
Owner

In Meteor, If template A includes template B and template B has an event map associated with it, then those event handlers should be bound. Currently, this does not work.

Template.B.events = {...}

In addition, there is no find() function available on the Template's instance (i.e. this when in a rendering callback) unless a Landmark was created for that template??

@bminer bminer was assigned
@bminer
Owner

This is caused by the way runtime.include includes templates. It does not setup a Landmark, events, etc. This should be changed so long as blocks don't exist in the included template.

@bminer bminer closed this issue from a commit
@bminer Blade 3.0.0rc2 - Major bugfixes for Meteor support
`runtime.include` no longer handles liveUpdate stuff; this is now handled by
`runtime-meteor.js`

`runtime-meteor.js` exposes `info` Object when performing file includes via
`blade._includeInfo`. The Blade smart package now generates Template functions
that read `blade._includeInfo` and pass it into the template.  Then, as normal,
the Template function will return reactive HTML and modify `info` as an
intended side-effect. `runtime-meteor.js` has been modified to determine
whether or not the included template contains any block declarations, and if
not, reactive HTML is injected into the template's HTML buffer. If block
definitions were used, then the template's HTML buffer is left untouched, as it
already contained non-reactive HTML. Fixes #139.
32ba1ee
@bminer bminer closed this in 32ba1ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.