سؤال

I have a handlebar helper function registered as follows:

Handlebars.registerHelper('link', function(text, url){
   return text + url; //whatever, return something
});

Now, if I call it like so, it works.

{{{link "hello" "localhost" }}} //works

but If I pass in a variable that has a path in it, it fails

{{{link "hello" ../url}}} //the second argument becomes undefined

Is this a bug with Handlebars?

هل كانت مفيدة؟

المحلول

it's working for me in beta4: http://jsfiddle.net/mgcross/GMrnz/34/ Is the 'url' key you're referencing nested?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top