How to call function with parameters ? #601
Unanswered
fadi-legit
asked this question in
Q&A
Replies: 1 comment 2 replies
-
|
That should work, just that everything except events are referenced off of the <each loop="item, index in numbers">
- <div>{{item.a}} + {{item.b}} = {{ plus(item.a, item.b) }}</div>
+ <div>{{item.a}} + {{item.b}} = {{ page.plus(item.a, item.b) }}</div>
</each> |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
im not sure how to use functions with parameters ? is it supported ?
e.g. : i want function that return dynamic value based on input
var plus = (a,b) => a+b
i was expected this usage:
in config file:
module.exports = { plus = (a,b) => a + b }in the HTML i will use it this way:
Beta Was this translation helpful? Give feedback.
All reactions