Closed fghhfg closed 6 years ago
The new lines should be kept, not sure why they’re not.
The expression @item.html tells vash to look for an html property on the item object. You can try either:
@(item + “.html”) @(item).html
I’m not sure the second will work. The first one with manual concatenation should though. On Fri, Oct 13, 2017 at 9:17 AM fghhfg notifications@github.com wrote:
Code:
@model.xxx.forEach(function(item){ @item })model.xxx = ['home', 'product', ...]
Expected:
What I got:
And how do make it newline?
I want my html become:
it is more readable...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kirbysayshi/vash/issues/122, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFiz5Xspt1sR98Q9K2YCFX_RousLllvks5sr2LxgaJpZM4P4eTL .
You are so quick!
@(item + “.html”)
: this one works.
@(item).html
: this one doesn't work.
thank you.
Thanks for reporting back, and glad to help! On Fri, Oct 13, 2017 at 9:31 AM fghhfg notifications@github.com wrote:
You are so quick!
@(item + “.html”) : this one works. @(item).html: this one doesn't work.
thank you.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/kirbysayshi/vash/issues/122#issuecomment-336453036, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFiz7lj6is4iSZRYQCf98QFm_pInr2iks5sr2YagaJpZM4P4eTL .
Code:
model.xxx = ['home', 'product', ...]
Expected:
What I got:
And how do make it newline?
I want my html become:
it is more readable...