0

我正在提交一个问题

当前行为

预期行为

尝试使用选项

使用说明最小化重现问题

Can't bind to 'dtOptions' since it isn't a known property of 'table'. ("
  <nb-card-body>
    <!--<table datatable class="row-border hover">-->
    <table datatable [ERROR ->][dtOptions]="dtOptions" class="row-border hover">
      <thead>
      <tr>
"): ng:///TablesModule/WithOptionsComponent.html@7:21
Can't bind to 'dtOptions' since it isn't a known property of 'table'. ("
  <nb-card-body>
    <!--<table datatable class="row-border hover">-->
    <table datatable [ERROR ->][dtOptions]="dtOptions" class="row-border hover">
      <thead>
      <tr>
"): ng:///TablesModule/WithOptionsComponent.html@7:21
Can't bind to 'dtOptions' since it isn't a known property of 'table'. ("
  <nb-card-body>
    <!--<table datatable class="row-border hover">-->
    <table datatable [ERROR ->][dtOptions]="dtOptions" class="row-border hover">
      <thead>

环境


- node version:v10.10.0
- angular version:6.0
- angular-cli version:6.0
- jquery version:3.3.1
- datatables version:1.10.19
- angular-datatables version:7.0.0

我 fork 项目ngx-admin;尝试集成角度数据表

阅读入门

但也有例外

项目代码

请帮我 1542804819644

4

1 回答 1

0
set app.module.ts
improt DataTablesModule.forRoot(),
set tables.module.ts
imports DataTablesModule

谢谢您的帮助。问题已解决。

于 2018-11-22T03:48:58.490 回答