Can't bind to dtOptions since it isn't a known property of table

3.8k Views Asked by At

I'm submitting a problem

Current behavior

Expected behavior

try with-options

Minimal reproduction of the problem with instructions

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>

Environment


- 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

I fork project ngx-admin ; try to integrated angular-datatable

read getting started

But there are exceptions

project code

Please help me 1542804819644

1

There are 1 best solutions below

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

Thank you for your help. The problem has been solved.