Closed AbQayyum closed 6 years ago
Hi, Sorry for the late reply. Did you sort it out?
I have also the same issue, can anybody solved this???
@28pankaj Can you share your code, please?
@brunano21 I haven't solved it yet. will spare some time to figure this out.
@AbQayyum Do you want to share some code?
@brunano21 the issue was resolved when updated the node version to 7.9.0. you may close this.
@brunano21 mine node version is 8.9.3.., you mean to say I have to degrade the version then it will work.
@28pankaj which of version of angular are you using?
@brunano21 angular "^5.2.0",
@28pankaj when are you getting this error?At runtime? Please share some code or screenshot, otherwise, I cannot help you.
@28pankaj When I was facing the issue I had different node version, my ng -v
command shows another version of node and node -v
command shows the other.
i am facing the same issue. my angular version is 6 and node version is 10.13.0 please help .
@brunano21
Exception details Error: Template parse errors: Can't bind to 'items' since it isn't a known property of 'data-table'.
<data-table [ERROR ->][items]="items" [itemCount]="itemCount" (reload)="reloadItems($event)" "): ng:///AppModule/ApplistComponent.html@3:0 Can't bind to 'itemCount' since it isn't a known property of 'data-table'.
<data-table-column [ERROR ->][property]="'title'" [header]="'Title'", [sortable]="true", "): ng:///AppModule/ApplistComponent.html@9:0 Can't bind to 'header' since it isn't a known property of 'data-table-column'.
[ERROR ->]<data-table-column [property]="'title'" [header]="'Title'", "): ng:///AppModule/ApplistComponent.html@8:0 'data-table' is not a known element:
App list
[ERROR ->]<data-table [items]="items" [itemCount]="itemCount" "): ng:///AppModule/ApplistComponent.html@2:0
my component is import { Component, OnInit } from '@angular/core'; import { DataTableResource } from "angular5-data-table";
@Component({ selector: 'app-applist', templateUrl: './applist.component.html', styleUrls: ['./applist.component.css'] }) export class ApplistComponent implements OnInit { applist:AppList[]; tableResource:DataTableResource
items:any[];
itemCount:number;
constructor() {
this.applist=[
{title:'title 1',category:'one',users:30, createdDate:new Date()},
{title:'title 2',category:'two',users:20,createdDate:new Date()},
{title:'title 3',category:'two',users:20,createdDate:new Date()},
{title:'fourth title',category:'three',users:10,createdDate:new Date()}
];
this.tableResource=new DataTableResource(this.applist);
this.tableResource.query({offset:0})
.then(items=> this.items=items)
this.tableResource.count().then(count=>this.itemCount=count)
}
reloadItems(params){ if(!this.tableResource) return;
} ngOnInit() { }
}
export interface AppList{ title:string category:string users:number createdDate:object }
and html is
<data-table [items]="items" [itemCount]="itemCount" (reload)="reloadItems($event)"
<data-table-column [property]="'title'" [header]="'Title'", [sortable]="true", [resizable]="true"
other details are Angular CLI: 1.7.0 Node: 6.10.2 OS: win32 x64