Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular *不适用于html表格(2)_Angular_Html Table_Ngfor - Fatal编程技术网

Angular *不适用于html表格(2)

Angular *不适用于html表格(2),angular,html-table,ngfor,Angular,Html Table,Ngfor,html 不适用于html表 应用程序模块 我在应用程序中只使用了一个模块 从'@angular/core'导入{NgModule}; 从“@angular/platform browser”导入{BrowserModule}; 从'@angular/forms'导入{FormsModule,ReactiveFormsModule}; 从“@angular/common”导入{LocationStrategy,HashLocationStrategy}; 从'@angular/Http'导入

html 不适用于html表


应用程序模块 我在应用程序中只使用了一个模块

从'@angular/core'导入{NgModule};
从“@angular/platform browser”导入{BrowserModule};
从'@angular/forms'导入{FormsModule,ReactiveFormsModule};
从“@angular/common”导入{LocationStrategy,HashLocationStrategy};
从'@angular/Http'导入{HttpModule,JsonpModule,Http,RequestOptions,XHRBackend,RequestOptionsArgs,Response,ConnectionBackend};
从“/app.routes”导入{AppRoutingModule};
从“./app.component”导入{AppComponent};
从“./components/admin/categories/categories.component”导入{CategoriesComponent};
从“./assets/scripts/services/LoadingInterceptor”导入{LoadingInterceptor};
从“./assets/scripts/services/EventsEmitter”导入{EventsEmitter};
从“angular2 toaster”导入{ToasterModule};
@NGD模块({
导入:[AppRoutingModule,BrowserModule,FormsModule,ReactiveFormsModule,HttpModule,JsonpModule,ToasterModule],
声明:[AppComponent,CategoriesComponent],
引导:[AppComponent],
提供者:[EventsEmitter,LoadingInterceptor,
{
提供:Http,
useFactory:(xhrBackend:xhrBackend,requestOptions:requestOptions,eventsEmitter:eventsEmitter)=>newloadinginterceptor(xhrBackend,requestOptions,eventsEmitter),
deps:[XHRBackend、RequestOptions、EventsEmitter]
},{提供:LocationStrategy,useClass:HashLocationStrategy}]
})
导出类AppModule{}

您只是在
*ngFor

<tr *ngFor="let category of categoriesInfo" >

您需要为指令
*ngFor
导入
CommonModule
,并使用
let
,如garth74所述:

import { CommonModule } from '@angular/common';


@NgModule({
  imports: [ CommonModule ],  // use 'imports' not 'import', s is mandatory
  ...
})