angular - How I should refactor my ngFor loops inside <template>? -
i haven't found examples how should refactor ngfor loops. loop angular 2 beta.08
<template ngfor #row [ngforof]="filterrows">
see api page ngfor:
<li *ngfor="let row of filterrows; let = index">...</li> `
<li template="ngfor let row of filterrows; let = index">...</li>`
<dl> <template ngfor let-row [ngforof]="filterrows" let-i="index"> <dt>...</dt> <dd>...</dd> </template> </dl>`
note how last form allows multiple elements repeated.
Comments
Post a Comment