meteor-jade
meteor-jade copied to clipboard
#{} syntax does not work correctly when calling a helper with arguments
Tested with Meteor 1.0.2.1 and mquandalle:jade 0.4.1:
main.jade
head
title Example
body
+example
example.tpl.jade
p A1: {{myHelper}}
// "A1: arg is undefined"
p A2: #{myHelper}
// "A2: arg is undefined"
p B1: {{myHelper 123}}
// "B1: arg is 123"
p B2: #{myHelper 123}
// "B2: #{myHelper 123}"
example.js
if (Meteor.isClient) {
Template.example.helpers({
myHelper: function(arg) {
return "arg is " + arg;
}
})
}
I have just observed this as well ;-(. The Spacebars syntax {{helper arg}}
works fine, but the Jade syntax #{helper arg}
does not work.
I have same bug.
+1
+1
+1
+1
I've modified a fork of this package to support the missing syntax, requested in this thread, together with a few other important features. The fork has been released as dalgard:jade
.
I will keep the new package in sync with the original, should there be any updates, but generally continue maintenance until the two packages can hopefully be merged, if/when mquandalle:jade
gets revived at some point.