如何将修复标题添加到无法滚动的自动完成弹出窗口中?

时间:2018-11-27 14:08:44

标签: angular autocomplete

我想将标头修复为自动完成,该怎么做 here is image what i want

1 个答案:

答案 0 :(得分:0)

为了创建此ui将div添加到下面的输入框中,在该div中添加ngfor循环,在文本更改过滤器数组上将下面的数组显示到文本框中 下面是实现的想法 <div> <!-- parent div --> <div> <input type="text"> <!-- add event on change and on change filter the array show the array in below div --> </div <div *ngFor="let item of items"> <!-- this div must be below to input box --> <div>item</div><button>Add</button> <!-- on click event add your logic after adding change the text of button --> </div> </div>