Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use for with function #3

Closed
rkosafo opened this issue Feb 7, 2017 · 2 comments
Closed

How to use for with function #3

rkosafo opened this issue Feb 7, 2017 · 2 comments

Comments

@rkosafo
Copy link

rkosafo commented Feb 7, 2017

How do you write a for whose data is from a function?

Template is

"""<li fs-for="item in (f data 'names')">{{{item}}}</li>"""

Error is

Compilation errors found: Cannot extract property after "." symbol from "(f",
@Dzoukr
Copy link
Owner

Dzoukr commented Feb 8, 2017

Hi @rkosafo,

in these cases I write functions calling rather:

"""<li fs-for="item in f(data, 'names')">{{{item}}}</li>"""

Does it work for you like this?

@rkosafo
Copy link
Author

rkosafo commented Feb 8, 2017

Yeah. It does. Removing the brackets also seem to do the trick. Thanks.

@rkosafo rkosafo closed this as completed Feb 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants