wycats/handlebars.js — Issue #184: No output in table
Author: TLINDEN
Created: 2012-02-20 14:29:22+00:00
State: open

Using the following input data:

```javascript
{
"services": [
{
"ip": "10.0.0.64",
"name": "test-sdevel1"
},
{
"ip": "10.0.0.65",
"name": "test-bdevel8"
},
{
"ip": "10.0.0.64",
"name": "test-bdevel1"
}
]
}
```

and the following template:

```html

Name
IP

{{#each services}}

{{ this.name }}
{{ this.ip }}

{{/each}}

{{#each services}}

Name: {{ this.name }}

IP: {{ this.ip }}

{{/each}}
```

I get:

```html

Name
IP

Name: test-sdevel1

IP: 10.0.0.64

Name: test-bdevel8

IP: 10.0.9.65

Name: test-bdevel1

IP: 10.0.8.64

```

As you can see, the second each loop works as expected but the first one doesn't. It doesn't matter if I put the each loop using the table after the other.

I can also put multiple each loops with

tags as in my example in one template, which works well. But it doesn't if I use a table. Since there is one empty column generated in the table, it looks as if handlebars DOES execute the loop but dies for whatever reason after the first loop.

I'm using 1.0.0 Beta 6.