我试图通过*ngIf在循环实现的列表中过滤掉一些项,但它给出了错误。请帮忙。
abc.component.html
<ul>
<li *ngFor="let x of students" *ngIf="x.age < 30">{{x.name}},{{x.age}}</li>
</ul>
abc.component.ts公司
students = [
{name: "Jack", age: 29, gender:"male", country: "USA"},
{name: "Ronald", age: 33, gender: "male", country: "UK"},
{name: "Lisa", age: 19, gender: "female", country: "UK"},
{name: "Donald", age: 43, gender: "male", country: "Austrailia"},
{name: "Simera", age: 23, gender: "female", country: "Italy"}
];
请帮助根据年龄筛选出li项目行<在上例中为30。谢谢您。