0

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

Kricss Yule
  • 55
  • 2
  • 10
  • Usually this kind of error message is related to missing imports. – GCSDC Nov 22 '18 at 02:36
  • I tried to introduce DataTablesModule to the same result. – Kricss Yule Nov 22 '18 at 02:51
  • Did you include both the import statement and the DataTablesModule into your module imports array? Are the component on which DataTable is being used on the same module on which you're importing DataTablesModule? – GCSDC Nov 22 '18 at 02:58
  • It seems like a total mess - there is nothing to do with angular here - there is no property as `dtOptions` for an html that is what the error suggest - add some of your code what you tried – Rahul Nov 22 '18 at 03:04
  • I can't understand where DataTables.Settings came from. I saw angular-datatables demo.https://github.com/l-lin/angular-datatables/tree/master/demo Neither copy nor paste works. – Kricss Yule Nov 22 '18 at 03:09
  • what is the version of angular-datatables? – Asanka Nov 22 '18 at 03:34

1 Answers1

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

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

Kricss Yule
  • 55
  • 2
  • 10