Hello Guys,
I juste start mustache.js a few days ago.
I understand that mustache was built to be logic-less.
But I would like to use make treatment that will require to use functions.
I saw here and there the concept of functions.
You define your functions in a JSON object and put it in the model/context of your templates.
But it seems to me that you may use functions only when you built your model/context from Javascript code and not from java code.
It is possible to define functions from Java code ?
I try to put a string defining the JS function in a java String.
If that's the case I do not get the point to have functions.
In my case I use java or Scala to run a program that built a mail from a template (html) and context/model ( an object ).
What is the interest of functions if they are limited to js implementation ?
Best Regards
Abdou