我在我的项目中使用 angular 5.0 并尝试使用我也在 angular-cli 中使用 bootstrap css 但不是材料
<ngx-datatable
[rows]="rows"
[columns]="columns">
</ngx-datatable>
但是在安装和导入模块后,我看不到页面上呈现的网格。
export class AppComponent{
rows = [
{ name: 'Austin', gender: 'Male', company: 'Swimlane' },
{ name: 'Dany', gender: 'Male', company: 'KFC' },
{ name: 'Molly', gender: 'Female', company: 'Burger King' },
];
columns = [
{ prop: 'name' },
{ name: 'Gender' },
{ name: 'Company' }
];
}
和 module.ts
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
@NgModule({
imports: [
BrowserModule,
NgxDatatableModule
],
declarations: [
AppComponent
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: APIHeaderInterceptor,
multi: true,
},
SlimLoadingBarService,
ToastsManager,
ToasterService,
ToastOptions
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
bootstrap: [AppComponent]
})