We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I'm using the component and it's working, except for the pagination. Follow my component class:
import { DataTableResource } from "angular-4-data-table"; import { UserList } from "./../../models/userList"; import { Component, OnInit } from ""; import { UserService } from "../../services/user-service.services";
import { DataTableResource } from "angular-4-data-table";
`
@component({ selector: "userList-cmp", moduleId: module.id, templateUrl: "userList.component.html", providers: [UserService] })
export class UserListComponent implements OnInit { userList: Array = new Array(); itemResource: any; userlistCount = 10; ` constructor(private userService: UserService) { console.log("construtor");
}
async ngOnInit() { await this.getUsers(); }
private async getUsers() { await this.userService.getUsers().subscribe( res => {this.userList = res; this.itemResource = new DataTableResource(res); this.userlistCount = this.userList.length; } ); } } `
HTML parameters:
<data-table [items]="userList" [itemCount]="userlistCount" [limit]="2">
Can you help me?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I'm using the component and it's working, except for the pagination.
Follow my component class:
import { DataTableResource } from "angular-4-data-table";
import { UserList } from "./../../models/userList";
import { Component, OnInit } from "";
import { UserService } from "../../services/user-service.services";
`
@component({
selector: "userList-cmp",
moduleId: module.id,
templateUrl: "userList.component.html",
providers: [UserService]
})
export class UserListComponent implements OnInit {
userList: Array = new Array();
itemResource: any;
userlistCount = 10;
`
constructor(private userService: UserService) {
console.log("construtor");
}
async ngOnInit() {
await this.getUsers();
}
private async getUsers() {
await this.userService.getUsers().subscribe(
res => {this.userList = res; this.itemResource = new DataTableResource(res); this.userlistCount = this.userList.length; }
);
}
}
`
HTML parameters:
<data-table [items]="userList" [itemCount]="userlistCount" [limit]="2">
Can you help me?
The text was updated successfully, but these errors were encountered: