Use the 'template' form of the ngFor syntax, seen here. It's a bit more verbose than the simpler *ngFor
version, but this is how you achieve looping without output html (until you intend to). One exception: you'll still get html comments within your <table>
but I'm hoping that's ok. Here's a working plunkr: http://plnkr.co/edit/KLJFEQlwelPJfNZYVHrO?p=preview
@Component({
selector: 'my-app',
providers: [],
directives: [],
template: `
<table>
<template ngFor #something [ngForOf]="somethings" #i="index">
<template ngFor #child [ngForOf]="something.children" #j="index">
<tr>{{child}}</tr>
</template>
</template>
</table>
`
})
export class App {
private somethings: string[][] = [
{children: ['foo1', 'bar1', 'baz1']},
{children: ['foo2', 'bar2', 'baz2']},
{children: ['foo3', 'bar3', 'baz3']},
]
}