angularjs-autocomplete

WebJar for angularjs-autocomplete

Лицензия

Лицензия

MIT
Категории

Категории

JavaScript Языки программирования Angular Взаимодействие с пользователем Веб-фреймворки Auto Библиотеки уровня приложения Code Generators
Группа

Группа

org.webjars.bower
Идентификатор

Идентификатор

angularjs-autocomplete
Последняя версия

Последняя версия

0.4.8
Дата

Дата

Тип

Тип

jar
Описание

Описание

angularjs-autocomplete
WebJar for angularjs-autocomplete
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/allenhwkim/angularjs-autocomplete

Скачать angularjs-autocomplete

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angularjs-autocomplete/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angularjs-autocomplete</artifactId>
    <version>0.4.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angularjs-autocomplete/
implementation 'org.webjars.bower:angularjs-autocomplete:0.4.8'
// https://jarcasting.com/artifacts/org.webjars.bower/angularjs-autocomplete/
implementation ("org.webjars.bower:angularjs-autocomplete:0.4.8")
'org.webjars.bower:angularjs-autocomplete:jar:0.4.8'
<dependency org="org.webjars.bower" name="angularjs-autocomplete" rev="0.4.8">
  <artifact name="angularjs-autocomplete" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angularjs-autocomplete', version='0.4.8')
)
libraryDependencies += "org.webjars.bower" % "angularjs-autocomplete" % "0.4.8"
[org.webjars.bower/angularjs-autocomplete "0.4.8"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

NOTICE

Although the example is working well, this repository is not well maintained well at this moment. Please use it at your own risk or become the admin of this module if you want to.

AngularJS Autocomplete

autocomplete for INPUT and SELECT tag for single/multi, local/remote

Features

  • We can simply just set autocomplete feature to INPUT and SELECT tag
  • It does not require more tags such as <ui-select-match>, <ui-select-choices>, or <autocomplete>
  • It treat SELECT element as select element, and INPUT element as INPUT element

Examples

Auto Complete INPUT tag
   <div auto-complete  source="source">
     <input ng-model="foo" placeholder="Select">
   </div>
  
Auto Complete SELECT tag
   <div auto-complete source="source" 
     placeholder="Select Bar">
     <select ng-model="bar"></select>
   </div>
  
Google Address Complete Example
   <div auto-complete source="source" 
     path-to-data="results" min-chars="2"
     display-property="formatted_address" 
     placeholder="Enter Address">
     <input id="ip" ng-model="addressText" name="addressText">
   </div>
  
Multiple Autocomplete
   <div auto-complete-multi 
     placeholder="Select One" source="source"> 
     <select ng-model="foo"></select>
   </div>
  
Custom Multi-Autocomplete
   <div>
    <span ng-repeat="obj in foo5 track by $index">
      {{'('+obj.key+') '+obj.text}})
      <a href="" ng-click="foo5.splice($index, 1)">x</a>
    </span>
    <auto-complete-div multiple ng-model="foo5"
      default-style="false"  source="source3">
      <input size="2" />
      <ul></ul>
    </auto-complete-div>
  </div>
  

To Get Started

For Bower users,

$ bower install angularjs-autocomplete

  1. Include angularjs-autocomplete.min.js
    <script src="http://rawgit.com/allenhwkim/angularjs-autocomplete.min.js"></script>

  2. add it as a dependency
    var myApp = angular.module('myApp', ['angularjs-autocomplete']);

  3. Use it

    $scope.listOfChoices = ['this', 'is', 'list', 'of', 'choices];

    <input auto-complete source="listOfChoices">

Attributes

  • source(required) : scope variable or function which is identified as a source of autocomplete It coule be array, url, or a function

  • ng-model(optional) : ng-model for INPUT or SELECT element

  • value-Changed(optional) : callback function when value is changed. Takes an argument as selected value. In example,

    $scope.callback = function(arg) {
      $scope.selected = arg;
    };
    
  • default-style(optional) : true as default. For your own styling, set default-style="false" and provide your own css.
    The example of customized css style is found at custom multiple select.
    You can also find default-style for starting point.

  • value-property(optional): "id" as default. When you define an array of hashes as source, the key of hash for ng-model value.
    e.g., 'key'

  • display-property(optional) : "value" as default. When you define an array of hashes as source, the key of hash for display.
    e.g., 'text'

  • min-chars(optional): 0 as default, if defined, autocomplete won't show any until length of input is greater than minimum charaters.

License

MIT License

Версии библиотеки

Версия
0.4.8
0.4.6