如何在 Angular 中对静态 JSON 数组执行 CRUD 操作? (无API)

问题描述 投票:0回答:1

我有这个 JSON 数组文件。

[
    {
      "id": 1,
      "name": "John Doe",
      "email": "[email protected]",
      "age": 25
    },
    {
      "id": 2,
      "name": "Jane Doe",
      "email": "[[email protected]]",
      "age": 28
    },
    {
      "id": 3,
      "name": "Bob Smith",
      "email": "[[email protected]",
      "age": 30
    }
]

如何通过 Angular Reactive Form 对该数组执行 CRUD 操作并将数据呈现在表格中?

我没有任何API。我想使用这个静态 JSON 来执行 CRUD 操作。

json angular frontend angular-reactive-forms crud
1个回答
0
投票

你尝试过json-server吗?通常我会模拟兼容数据并使用它来实现 mvps

© www.soinside.com 2019 - 2024. All rights reserved.