ngFor example is terrible. If you look into documentation more carefully you will see example that you will use 100% of your code time:
<li *ngFor=”let item of items; index as i; trackBy: trackByFn”>…</li>
And if you remove some optional variables, you will get clean code:
<li *ngFor=”let item of items”>…</li>
As simple as VueJS.
Nothing bad happens when you are using JS in HTML. You are using CSS in HTML or SVG in HTML every day. This is a convenient way to write dev friendly templates.