AngularJS的輸入框自動補全:Angucomplete
一個簡單但強大的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 </ul>
基本使用示例:
<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"/>
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!