Dan Cancro Dan Cancro - 5 months ago 28x
AngularJS Question

In <template ngFor #item [ngForOf]="items">, item displays as [object Object]

If I interpolate a string variable in a repeated

it shows up correctly, but if I put it in a
it shows up as [object Object]. Why is that? I've seen a few evolutions of the
syntax but none seems to work.



If you use #item then item will refer to TemplateRef. You need to use let-item like this:

<template ngFor let-item [ngForOf]="items">