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

I'm submitting a problem

Текущее поведение

Ожидаемое поведение

try with-options

Минимальное воспроизведение задачи с инструкциями

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

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

read getting started

But there are exceptions

project code

пожалуйста, помогите мне1542804819644

1 ответ

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

Спасибо за помощь. Проблема была решена.

Другие вопросы по тегам