I looked at similar questions, but none of them helped me. I am going to receive an object like the following:
[
{
\"id\": 1,
\"name\": \"Safa\",
For anyone else with this issue that arrives here via Google, please check that the host element of the *ngFor
directive is accurate. By this, I mean that I encountered this error and spent a long time researching fixes before realizing that I had put the *ngFor
on an ng-template
element instead of on my component I wanted to repeat.
Incorrect
<\ng-template>
Correct
I know this is an obvious mistake in hindsight, but I hope an answer here will save someone the headache I now have.