前言
Thingsboard的前端是使用angular11开发的,官方代码里面已经抽象了很多通用的功能,只需参照其他实体的前端代码,即可完成相应实体前端的功能。
前端实体操作功能开发步骤
一下文件都是相对于UI-NGX的目录
| 序号 | 步骤 | 文件/说明 |
|---|---|---|
| 1 | 增加routing module | 在目录\src\app\modules\home\pages\下执行ng g module defect --routing |
| 2 | 增加component | 在目录\src\app\modules\home\pages\defect下执行ng g component defect --flat --skip-tests |
| 3 | 增加tab component | 在目录\src\app\modules\home\pages\defect下执行ng g component defect-tabs --flat --skip-tests |
| 4 | 增加实体类型 | src\app\shared\models\entity-type.models.ts |
| 5 | 增加模型 | src\app\shared\models\defect.models |
| 6 | 增加id模型 | src\app\shared\models\id\defect-id |

本文介绍使用Angular11为ThingsBoard开发前端实体操作功能的详细步骤,包括路由、组件创建及国际化等关键环节。
最低0.47元/天 解锁文章
358

被折叠的 条评论
为什么被折叠?



