所有可用的表都没有呈现,我不知道我的错误或文档问题是否无法呈现我正在使用的示例:
ng new project
创建src / files:
的index.html:
<table datatable class="row-border hover">
<thead>
<tr>
<th>ID</th>
<th>First name</th>
<th>Last name</th>
</tr>
</thead>
<tbody>
...
</tbody>
</table>
<app-root> </app-root>
main.ts:
import { Component,NgModule } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { AppComponent } from './app/app.component';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
platformBrowserDynamic().bootstrapModule(AppModule);
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule
],
providers: [],
bootstrap: [AppComponent]
})
@Component({
selector: 'zero-config',
templateUrl: 'index.html'
})
export class IndexComponent {}
项目中实现的测试是:
零配置: https://l-lin.github.io/angular-datatables/#/basic/zero-config
请求任何帮助。