AngularJS directive for valid email tokenizer
While implementing Single Page Application through WebAPI and AngularJS, you come across number of times to use filters and directives in order to meet requirements specified by clients. The below code snippet tokenizes input and displays them in a separate block within a specific placeholder, however it checks the input is a valid email address first and then the input token is not repetitive within the same placeholder.
- Add Jquery File
- Add AngualrJS File
- Add AngaulrJS Route file [optional]
- Add Input Tokenizer CSS
- Attach directive to your angaulr app
Note:
a. Press enter/tab to create token. b. Only valid email addresses are allowed. c. in case of repeat input token value, it will be discarded, only one value will be displayed in palceholder.