{"id":13728984,"url":"https://github.com/marinantonio/angular-mat-table-crud","last_synced_at":"2026-04-04T17:36:28.051Z","repository":{"id":28503187,"uuid":"117007212","full_name":"marinantonio/angular-mat-table-crud","owner":"marinantonio","description":"CRUD operations for the Angular Material Table","archived":false,"fork":false,"pushed_at":"2023-02-03T04:56:30.000Z","size":5634,"stargazers_count":382,"open_issues_count":8,"forks_count":214,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-05-08T01:36:38.321Z","etag":null,"topics":["angular","angular-material","crud"],"latest_commit_sha":null,"homepage":"https://marinantonio.github.io/angular-mat-table-crud/","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/marinantonio.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":"2018-01-10T20:28:01.000Z","updated_at":"2025-04-04T08:32:24.000Z","dependencies_parsed_at":"2023-02-15T08:02:06.904Z","dependency_job_id":null,"html_url":"https://github.com/marinantonio/angular-mat-table-crud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marinantonio/angular-mat-table-crud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinantonio%2Fangular-mat-table-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinantonio%2Fangular-mat-table-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinantonio%2Fangular-mat-table-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinantonio%2Fangular-mat-table-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marinantonio","download_url":"https://codeload.github.com/marinantonio/angular-mat-table-crud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marinantonio%2Fangular-mat-table-crud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31407645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular","angular-material","crud"],"created_at":"2024-08-03T02:00:53.153Z","updated_at":"2026-04-04T17:36:28.016Z","avatar_url":"https://github.com/marinantonio.png","language":"TypeScript","funding_links":[],"categories":["UI Components"],"sub_categories":["Table"],"readme":"# CRUD for Angular Material Table\n\nProject showcasing my CRUD (Create, Read, Update, Delete) implementation on Angular Mat-Table. Most importantly frontend updates accordingly\nwith operations. This is important if you're using data from backend (some DB like MySQL) but I guess It can be used for local generated data\nas well.\n\n**Project is updated and now runs on Angular version 13 including Angular Material 13.**\n* For Angular 6 clone [angular_6 branch](https://github.com/marinantonio/angular-mat-table-crud/tree/angular_6).\n* For Angular 4 clone [angular_4 branch](https://github.com/marinantonio/angular-mat-table-crud/tree/angular_4).\n\n## Screenshots\n\nCode in action:\n\n![Alt Text](https://i.imgur.com/QcXMtzK.gif)\n\n\n## REST API\nHere's a sample from my real-life application (sorry for Croatian):\n\n![Alt Text](https://i.stack.imgur.com/atzqB.gif)\n\nAngular app using PHP RESTful API does backend updates to MySQL DB.\nYou can find entire HttpClient REST code from this project inside dataService.\n\n## Demo\n\nYou can play around with code demo [here](https://marinantonio.github.io/angular-mat-table-crud/).\n\n## Refresh function\n\nMaterial Table updates if you do a pagination or filter update. You can trigger that with simple method\nas follows:\n\n```\nprivate refreshTable() {\n  this.paginator._changePageSize(this.paginator.pageSize);\n}\n```\nCredits to [yeager-j](https://github.com/marinantonio/angular-mat-table-crud/issues/12) for providing the refresh function\n\nOld method:\n```\nprivate refreshTable() {\n    // if there's a paginator active we're using it for refresh\n    if (this.dataSource._paginator.hasNextPage()) {\n      this.dataSource._paginator.nextPage();\n      this.dataSource._paginator.previousPage();\n      // in case we're on last page this if will tick\n    } else if (this.dataSource._paginator.hasPreviousPage()) {\n      this.dataSource._paginator.previousPage();\n      this.dataSource._paginator.nextPage();\n      // in all other cases including active filter we do it like this\n    } else {\n      this.dataSource.filter = '';\n      this.dataSource.filter = this.filter.nativeElement.value;\n    }\n  }\n```\n\nIn case you have smaller dataset without need for a paginator you can update just using filter:\n\n```\nprivate refreshTable() {\n    // if there's nothing in filter\n    if (this.dataSource._filterChange.getValue() === '') {\n        this.dataSource.filter = ' ';\n        this.dataSource.filter = '';\n    } else {\n        // if there's something, we make a simple change and then put back old value\n        this.dataSource.filter = '';\n        this.dataSource.filter = this.filter.nativeElement.value;\n    }\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarinantonio%2Fangular-mat-table-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarinantonio%2Fangular-mat-table-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarinantonio%2Fangular-mat-table-crud/lists"}