我需要能够在模板中进行循环并使用我正在做的同一标签上的数据中的值*ngFor
。像这样:
<a *ngFor="#language of Settings.allLanguages" id="language-link-{{language.id}}">
{{language.name}}
</a>
但它给出了错误:
Can't bind to 'value' since it isn't a known native property
(如果我只在标签标记中留下循环代码 - 它工作正常:
<a *ngFor="#language of Settings.allLanguages">
{{language.name}}
</a>