AngularJS的输入框自动补全:Angucomplete

jopen 4年前

一个简单但强大的AngularJS指令(directive)能够让你快速创建自动补全输入框。数据源可以是来自远程服务器或本地变量示例: http://darylrowland.github.io/angucomplete


关键特性:
  • Show just a title, a title and a description or a title, description and image in your autocomplete list
  • Deliberately minimally styled so you can customise it to your heart's content!
  • Reads JSON data and allows you to specify which fields to use for display
  • Simple setup - e.g. to pull data from a server, just set the url parameter


AngularJS的输入框自动补全:Angucomplete

基本使用示例:

<angucomplete id="members"        placeholder="Search members"        pause="400"        selectedobject="testObj"        url="http://myserver.com/api/user/find?s="        datafield="results"        titlefield="firstName,surname"        descriptionfield="email"        imagefield="profilePic"        inputclass="form-control form-control-small"/>

项目主页:http://www.open-open.com/lib/view/home/1429836181682