[英]Angular ngFor not working with material since it isn't a known property
angular ngfor can't bind to 'ngForOf' since it isn't a known property of angular ngfor不能绑定到ngForOf,因为它不是的已知属性
<div class="col-md-3 col-sm-3 shadow-sm bg-white rounded leftSideBar">
<ul class="list-group">
<mat-radio-group aria-label="Select an option">
<li class="list-group-item" *ngFor="let item of items">
{{i.name}}
<mat-radio-button [value]="i.id"></mat-radio-button>
</li>
</mat-radio-group>
</ul>
</div>
Add BrowserModule
to imports: []
in AppModule
将BrowserModule
添加到imports: []
AppModule
imports: []
import { BrowserModule } from '@angular/common';
..
..
@NgModule({
imports: [ BrowserModule ],
..
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.