Angular 撤销重做历史存储 | ng-hub-ui-history

Angular 撤销和重做历史存储,提供对 Signals 友好的 API、事务、限制以及响应式表单支持。

交互式示例

探索实时示例,了解该库在常见 Angular 用例中的表现。

基础历史记录

{
  "title": "Getting Started with History",
  "description": "Edit and commit to create undo/redo entries."
}

嵌套对象历史记录

{
  "id": "invoice-1",
  "customer": {
    "name": "Acme Corp",
    "city": "Madrid"
  },
  "lines": [
    {
      "name": "Support plan",
      "quantity": 1,
      "unitPrice": 150
    }
  ]
}

响应式表单监听

{
  "name": "Maria",
  "email": "maria@demo.local",
  "role": "Editor"
}

事务与限制

Pointer: -1 / Entries: 0 / Bytes: 0

{
  "id": "transaction-editor",
  "title": "Release notes draft",
  "content": "Initial draft content.",
  "tags": [
    "draft"
  ]
}