百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
A

angular-mat-table-crud

> 前端框架
开源

Angular Material Table 的 CRUD 操作

378 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Angular Material Table 的 CRUD 操作

CRUD for Angular Material Table

Project showcasing my CRUD (Create, Read, Update, Delete) implementation on Angular Mat-Table. Most importantly frontend updates accordingly with 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 as well.

Project is updated and now runs on Angular version 13 including Angular Material 13.

  • For Angular 6 clone angular_6 branch.
  • For Angular 4 clone angular_4 branch.

Screenshots

Code in action:

REST API

Here's a sample from my real-life application (sorry for Croatian):

Angular app using PHP RESTful API does backend updates to MySQL DB. You can find entire HttpClient REST code from this project inside dataService.

Demo

You can play around with code demo here.

Refresh function

Material Table updates if you do a pagination or filter update. You can trigger that with simple method as follows:

private refreshTable() {
  this.paginator._changePageSize(this.paginator.pageSize);
}

Credits to yeager-j for providing the refresh function

Old method:

…

In case you have smaller dataset without need for a paginator you can update just using filter:

private refreshTable() {
    // if there's nothing in filter
    if (this.dataSource._filterChange.getValue() === '') {
        this.dataSource.filter = ' ';
        this.dataSource.filter = '';
    } else {
        // if there's something, we make a simple change and then put back old value
        this.dataSource.filter = '';
        this.dataSource.filter = this.filter.nativeElement.value;
    }
  }

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptangularangular-materialcrud

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架