我正在使用 ngTagInput 库参考: http ://mbenford.github.io/ngTagsInput/我对其进行了一些定制以满足我的要求。
现在,我希望在输入焦点后立即显示带有获取数据的下拉列表。
E.g.
users = ["stack" ,"subj" ,"owner"];
1. Now on focusing input ("Add User"), all three users should be fetched.
2. After I input "s",then, only "stack" and "subj" should be shown.
For that, I tried ng-focus= "newTagChange()" instead of ng-change="newTagChange()".
But it didn't work as expected.
I also tried with minLength="0" which failed as well.
在以下位置查找当前实现:Plunker
http ://plnkr.co/edit/shgh40H3Nc0eEeM4Lidd?p=preview
请建议。