Skip to content

Instantly share code, notes, and snippets.

@rdickert
Created November 5, 2012 23:03
Show Gist options
  • Save rdickert/4020997 to your computer and use it in GitHub Desktop.
Save rdickert/4020997 to your computer and use it in GitHub Desktop.
ie9 bug in Meteor 0.5.0
<head>
<title>ie9bug_test</title>
</head>
<body>
{{> hello}}
</body>
<template name="hello">
<h1>IE9 bug</h1>
{{#with withContext}}
context: {{context.text}}
{{#each myList}}
<input type="button" value="Click" />
{{/each}}
{{/with}}
</template>
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "Welcome to ie9bug_test.";
};
Template.hello.context = {
text: "We are in the '#with' context."
};
Template.hello.myList = [{text: "We are in the '#each' context "}];
Template.hello.events({
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("context: ", this.text);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment