egg-list-as-input

Angular directive which allow user to add multiple values in a single input


License
Apache-2.0
Install
bower install egg-list-as-input

Documentation

list-as-input

Angular directive which allow user to add multiple values in a single input

Install

You can install this package either with bower.

bower

bower install angular Then add a

HTML Usage

Example with default pattern (ie:string matching) and default separator (ie: ';')

  <input list-input
         ng-model="counter"
         label="Counter lists"
         type="text"
         placeholder="Size"
         name="counter">

Example with custom pattern

 <input list-input="match="^(\w+\d+)$" end-with=','"
         ng-model="emails"
         name="emails"
         label="Email list"
         type="text"
         placeholder="Email">
  <input list-input
         ng-model="counter"
         egg-pattern="^\d+$"
         label="Counter lists"
         egg-end-with=";"
         type="text"
         placeholder="Size"
         name="counter">

Example with list values validation

  <input list-input
         ng-model="counter"
         egg-value="['value1','value2','value3']"
         label="Counter lists"
         type="text"
         placeholder="Size"
         name="counter">

Build & development

Run grunt for building and grunt serve for preview.

Testing

Running grunt test will run the unit tests with karma.