What is the correct template syntax for using the built-in ngFor structural directive to render out a list of productNames?

  • [ ] <ul>
    <li [ngFor]=”let productName of productNames”>
    {{ productName }}
    </li>
</ul>
  • [ ] <ul>
    <li ngFor=”let productName of productNames”>
    {{ productName }}
    </li>
</ul>
  • [x] <ul>
    <li *ngFor=”let productName of productNames”>
    {{ productName }}
    </li>
</ul>
  • [ ] <ul>
    <? for productName in productNames { ?>
    <li>{{ productName }}</li>
    <? } ?>
</ul>

Leave a Reply

Your email address will not be published. Required fields are marked *