kirbysayshi/vash

<a href="@item.html">...

Closed this issue · 3 comments

Code:

<div>
  @model.xxx.forEach(function(item){
    <a href="@item.html">@item</a>
  })
</div>

model.xxx = ['home', 'product', ...]

Expected:

<div>
  <a href="home.html">home</a><a href="product.html">product</a>...
</div>

What I got:

<div>
  <a href="">home</a><a href="">product</a>...
</div>

And how do make it newline?

I want my html become:

<div>
  <a href="home.html">home</a>
  <a href="product.html">product</a>
  ...
</div>

it is more readable...

You are so quick!

@(item + “.html”) : this one works.
@(item).html: this one doesn't work.

thank you.