In my angular application was installed the ngx-datatable component, when mounting a test I got it simple everything occurred as expected, however when using the ngx-datatable-footer element I was returned the following message:
Uncaught Error: Template parse errors: 'ngx-datatable-footer' is not a known element: 1. If 'ngx-datatable-footer' is an Angular component, then verify that it is part of this module. 2. If 'ngx-datatable-footer' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress > this message. ("
[ERROR ->]<ngx-datatable-footer> <ng-template ngx-datatable-footer-template>
"): ng:///GeneAppModule/ProcessoFormComponent.html@567:8 at syntaxError (http://localhost:4200/vendor.bundle.js:170688:34) at TemplateParser.webpackJsonp.../../../compiler/@angular/compiler.es5.js.TemplateParser.parse (http://localhost:4200/vendor.bundle.js:181808:19) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileTemplate (http://localhost:4200/vendor.bundle.js:195960:39) at http://localhost:4200/vendor.bundle.js:195880:62 at Set.forEach (native) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileComponents (http://localhost:4200/vendor.bundle.js:195880:19) at http://localhost:4200/vendor.bundle.js:195767:19 at Object.then (http://localhost:4200/vendor.bundle.js:170677:148) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler._compileModuleAndComponents (http://localhost:4200/vendor.bundle.js:195766:26) at JitCompiler.webpackJsonp.../../../compiler/@angular/compiler.es5.js.JitCompiler.compileModuleAsync (http://localhost:4200/vendor.bundle.js:195695:37)
Code works:
<ngx-datatable
class="material"
[rows]="rows"
[columnMode]="'force'"
[footerHeight]="100"
[headerHeight]="50"
[rowHeight]="'auto'">
<ngx-datatable-column name="Ordem" prop="ordem" [width]="75">
<ng-template let-column="column" ngx-datatable-header-template>
{{column.name}}
</ng-template>
<ng-template let-value="value" ngx-datatable-cell-template>
{{value}}
</ng-template>
</ngx-datatable-column>
</ngx-datatable>
Code does not work:
<ngx-datatable
class="material"
[rows]="rows"
[columnMode]="'force'"
[footerHeight]="100"
[headerHeight]="50"
[rowHeight]="'auto'">
<ngx-datatable-footer>
<ng-template
ngx-datatable-footer-template>
<div style="padding: 5px 10px">
TESTE
</div>
</ng-template>
</ngx-datatable-footer>
</ngx-datatable>
Version in my package.json:
"@angular/core": "^4.2.2",
"@swimlane/ngx-datatable": "7.2.1",