akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 877 forks source link

Lib fails to build when using fullTemplateTypeCheck #994

Open doivosevic opened 5 years ago

doivosevic commented 5 years ago

You seem to have 2 bugs


ERROR in node_modules\ng2-smart-table\components\tbody\tbody.component.html(1,2005): : Operator '+' cannot be applied to types 'number' and 'boolean'.
node_modules\ng2-smart-table\components\thead\cells\title\title.component.d.ts.TitleComponent.html(3,17): : Expected 1 arguments, but got 2.

which are caught when using fullTemplateTypeCheck.

In your tsconfig.json add


{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "baseUrl": "src",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2016",
      "dom"
    ],
    "plugins": [
      { "name": "tslint-language-service"}
    ]
  },
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
  "angularCompilerOptions": {
    "fullTemplateTypeCheck": true,
  },
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
doivosevic commented 5 years ago

Check out my https://github.com/DominikDitoIvosevic/ng2-smart-table/commit/0bd8290682422d56b57343bdd2a52a65f74bf636