S
S
SEACRE5T2021-12-10 17:06:45
JavaScript
SEACRE5T, 2021-12-10 17:06:45

Such a destructuring notation is considered a constraint and ngulare?

<div *ngFor="let [lang, value] of langMap.entries()">foo</div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2021-12-10
@Xuxicheta

1. destructuring assignments in struct microsyntax doesn't work https://github.com/angular/angular/issues/27555
2. it's better to write like this

<div *ngFor="let entry of obj | keyvalue">
  {{ entry.key }} {{ entry.value }}
</div>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question