{"id":13497325,"url":"https://github.com/dennis-b/NG2TableView","last_synced_at":"2025-03-28T21:32:20.438Z","repository":{"id":57171389,"uuid":"58932900","full_name":"dennis-b/NG2TableView","owner":"dennis-b","description":"ng2 table-view with angular material","archived":false,"fork":false,"pushed_at":"2018-03-10T06:32:08.000Z","size":3298,"stargazers_count":18,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T21:44:02.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://dennis-b.github.io/NG2TableView/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dennis-b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T13:04:12.000Z","updated_at":"2022-11-30T19:57:15.000Z","dependencies_parsed_at":"2022-08-27T13:11:46.756Z","dependency_job_id":null,"html_url":"https://github.com/dennis-b/NG2TableView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennis-b%2FNG2TableView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennis-b%2FNG2TableView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennis-b%2FNG2TableView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennis-b%2FNG2TableView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dennis-b","download_url":"https://codeload.github.com/dennis-b/NG2TableView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245798562,"owners_count":20673902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T20:00:28.952Z","updated_at":"2025-03-28T21:32:20.192Z","avatar_url":"https://github.com/dennis-b.png","language":"TypeScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# NG2TableView [![npm version](https://badge.fury.io/js/NG2TableView.svg)](https://www.npmjs.com/package/NG2TableView)\nNG2TableView for Angular2 apps.\n\nTable component with sorting, filtering, paging, custom cell template, nested values bind ... for Angular2. inspired by [ng2-table](https://github.com/valor-software/ng2-table)\n\n\n# Usage \u0026 Demo\n\n[http://dennis-b.github.io/NG2TableView/](http://dennis-b.github.io/NG2TableView/)\n\n- - -\n\n## Getting Started\nMake sure you have [Nodejs](https://nodejs.org/)\n\n\nBest way to install ***NG2TableView*** is through [npm](https://www.npmjs.com/package/NG2TableView)\n\n  ```bash\n  npm i NG2TableView --save\n  ```\n  Or, you can [download it in a ZIP file](https://github.com/dennis-b/NG2TableView/archive/master.zip).\n\n\n## Usage\n\n**import module in yours AppModule:**\n\n```\nimport {Ng2TableViewModule} from \"NG2TableView\";\n@NgModule({\n    imports: [Ng2TableViewModule, ...],\n   ...\n})\nexport class AppModule {\n}\n\n```\n\n## some-comp.ts\n```bash\n  import {TableView} from \"NG2TableView\";\n  import {Component, OnInit} from '@angular/core';\n  import {PageTableColumns} from \"./cols/columns\";\n  import {Route, ActivatedRoute} from \"@angular/router\";\n  \n  @Component({\n      selector: \"demo-page\",\n      template: require('./page.html')\n  })\n  export class Page extends TableView implements OnInit {\n  \n      constructor(private route: ActivatedRoute) {\n          super(route.data.getValue().users);\n      }\n  \n      ngOnInit() {\n          this.getBuilder()\n              .addCols(PageTableColumns)\n              .setPaging(true)\n              .setItemsPerPage(5)\n              .setSelectable(true);\n  \n          this.buildTable();\n      }\n  }\n```\n\n## columns.ts\n```bash\nexport const PageTableColumns:Array\u003cColumnIfc\u003e = new TableColumns()\n    .addCol(new TableColumn()\n        .setTitle(\"index\")\n        .setName(\"index\")\n        .setSort(true)\n    )\n    .addCol(new TableColumn()\n        .setTitle(\"Editable name \")\n        .setName(\"name\")\n        .setTemplate(require(\"./custom-template.html\"))\n        .setSort(true)\n    )\n\n    ...\n```\n\n## page.html (template)\n\n```bash\n\u003cdiv class=\"page\"\u003e\n    \u003cmd-content layout-padding\u003e\n        \u003cdiv layout-gt-sm=\"row\"\u003e\n            \u003cmd-input type=\"text\"\n                      placeholder=\"filter by index\"\n                      class=\"col\"\n                      [column]=\"'index'\"\n                      ng2TableViewFilter=\"tableBuilder.filtering\"\n                      (tableChanged)=\"onChangeTable($event)\"\u003e\n            \u003c/md-input\u003e\n        \u003c/div\u003e\n\n        \u003cng2TableView [config]=\"tableBuilder\"\n                      (tableChanged)=\"onChangeTable($event)\"\n                      [rows]=\"tableBuilder.rows\"\n                      [columns]=\"tableBuilder.columns\"\u003e\n        \u003c/ng2TableView\u003e\n\n        \u003cdiv class=\"text-center\"\u003e\n            \u003cngTableViewPaging [config]=\"tableBuilder\"\n                               [dataLength]=\"tableBuilder.length\"\n                               (pageChanged)=\"onChangeTable($event)\"\u003e\n            \u003c/ngTableViewPaging\u003e\n        \u003c/div\u003e\n    \u003c/md-content\u003e\n\u003c/div\u003e\n\n```\n\n...\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennis-b%2FNG2TableView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennis-b%2FNG2TableView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennis-b%2FNG2TableView/lists"}