Reputation: 9549
I use meteor.js.
I installed i18n and arillo:flow-router-helpers packages. I need to do like:
<a href="{{ pathFor i18n 'dictionary.update' }}">edit</a>
which means pathFor(i18n('dictonary.update')) in javascript.
How to do this on blaze template?
Upvotes: 1
Views: 137
Reputation: 482
You can use parentheses to compose functions in blaze.
you can do this {{pathFor (i18n 'dictionary.update') }}
the parentheses ()
call the function i18n
with the argument dictionary.update
. Its kinda like lisp, the best programming language ever.
this would be equivalent to pathFor( i18n('dictionary.update') );
if the functions where just in regular JS.
I hope that helps.
Upvotes: 1