Created
November 5, 2012 23:03
-
-
Save rdickert/4020997 to your computer and use it in GitHub Desktop.
ie9 bug in Meteor 0.5.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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