首页 > 解决方案 > 如何使用Angular用自定义文本框替换文本框?

问题描述

需要使用 Angular 将数据表文本框替换为自定义文本框。在具有 API 配置的数据表搜索框中具有功能,因此尝试使用 Angular 将原始搜索文本框替换为自定义文本框,尝试以下方式,请向我建议解决方案。

const div = this.renderer.createElement('div');
const input = this.renderer.createElement('input');
this.renderer.appendChild(div, input);
const textboxes = document.getElementById('textboxes');
this.renderer.appendChild(textboxes, div);

示例演示

标签: angularangular-datatables

解决方案


推荐阅读