Code Monkey home page Code Monkey logo

ngtagsinput's People

Contributors

chris-l avatar davideicardi avatar dlukez avatar fastf0rward avatar foxxmd avatar hamchapman avatar just-boris avatar loganbarnett avatar mbenford avatar oteichmann avatar punzki avatar se7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngtagsinput's Issues

tag should be validated against both minLength and maxLength in tryAdd()

now maxLength is implemented as attribute in template and min as condition in controller, which is inconsistent (both in code and in tests) and - in the case I run into it - adds complexity to project unit tests of modules which use this function.

It'll also make it easier to validate min and max (to define ng-invalid-* helper class)

typeahead?

Awesome tool! I suggested it for CDNJS hosting.
Is there a quick way to add typeahead functionality to the input by combining the directives somehow?

Greek letters

Quickly checking the demo in your site I found out that I probably cannot write greek letters in the tag.

Regards

Petros

Trying to add hebrew characters to regex

Hi, i'm probably doing something wrong, but i can't add hebrew characters to tag-input..

i've tried this:
allowedTagsPattern="^[\u0590-\u05FFa-zA-Z0-9\s]+$"
with no success,still only english.
But then i've tried to accept everything:
allowedTagsPattern="[\s\S]
"
Also, same default behaviour, only english..

can you help me please and tell me what am i doing wrong?
Thanks!

Allow "down arrow" to be used to bring up the complete list of tags [feature-request]

It would be nice to be able to use the down arrow key within the autocomplete box to get a complete list of all available tags. This would most likely need to be a scrolling list of tags using the current setting for the number of tags shown in the autocomplete as a means of determining the maximum height of the box. The Select2 jQuery plugin does this and it's a nice feature for users that can't find the tag they're looking for.

Add feature to allow user store only keys in separate property

Hi guys,

i suggest to implement feature add separate property that will store only key for selected tags.
So, source will be like key value dictionary and when user select some tag from autocomplete - we will store only key for this tag.

Also, is there any way to reject manually entered test if its not matched with any of tags in predefined source.
For example we have in source tree tags: 'aaa', 'bbb', 'ccc'. User manually try to enter value 'ddd'. Currently directive will add it when you finish edit. But for me more usefully case reject entered text if we have no it in source list.

What do you think?

Missing focus outline

The directive is missing a focus outline to clearly indicate it's the active element on the page. That is critical for keyboard users that rely on the outline to know where they are on the page.

Support for Angular's validation CSS classes

Now that version 1.1.0 is out and support for ngModelController is available, the tagsInput element should support Angular's validation classes (ng-valid-*, ng-invalid-*, ng-pristine and ng-dirty) so it can be styled according to its state.

transcludeFn is not defined

I am using angular 1.2.0 with the latest ng-tags-input build. I thought I cut and pasted the examples directly into my code but I am getting this error when I refresh the page:

TypeError: undefined is not a function
at http://localhost:8080/app/vendor/ng-tags-input/ng-tags-input.js:464:9

...which means that in this function...

  tagsInput.directive('transcludeAppend', function() {
      return function(scope, element, attrs, ctrl, transcludeFn) {
          transcludeFn(function(clone) {
              element.append(clone);
          });
      };
  });

...transcludeFn is not defined. My template contains this...

  <tags-input ng-model="tags" placeholder="Add a tag">
    <auto-complete source="loadTags($query)"></auto-complete>
  </tags-input>

...and my controller contains this...

$scope.loadTags = function(query) {
  return $http.get('/tags?query=' + query).then(function(response) {
    return response.data;
  });
};

...please help?

Autocomplete directive should comply with Angular's guidelines

Autocomplete directive's source property should comply with Angular's guidelines for expression properties. In other words, this

<autocomplete source="func"></autocomplete>

should be changed to this

<autocomplete source="func(text)"></autocomplete>

Minimum tags option for tags-input

To complement #24, the directive could also have a minTags option that renders the element invalid when the number of added tags is lesser than the provided value. In order to mark the element as invalid, the solution for #45 could be used.

typeahead integration

Is there a way to intergrate typeahead into this awesome directive? It is awesome enough by it's own, but with a typeahead functionality it would be mother of awesome

placeholder doesn't get an expression

For example if i want to use angular-translate for the placeholder in the input:
placeholder="{{ 'ADD_CATEGORIES' | translate }}"
if won't get the value (although that in regular input it does work fine).

Thanks man, good job

Support for `$http` promises in autocomplete

It would be nice if the autocomplete directive supported $http promises in addition to regular ones, so the following code would work:

$scope.loadItems = function(query) {
    return $http.get('/tags?query?=' + query);
}

Currently some boilerplate code is needed to achieve the same result:

$scope.loadItems = function(query) {
    return $http.get('/tags?query?=' + query).then(function(response) {
        return response.data;
    }
}

Support for ngModelController

It would be nice if the directive had support for ngModelController so it could report validation errors the same way a regular input does.

using input autocomplete property breaks things

hi!
if i write smth like
input autocomplete="off"
anywhere in my project, it thinks that its a directive, so it doesnt find stuff its meant to and throws an error.

since you test autocomplete directive only as an element, apparently you mean it to be used as an element, so you could restrict it to 'E' and not 'AE'.

and of course you could just rename it =)

Global configuration

There could be a way to globally configure options for tagsInput/autocomplete, so applications which have more than one tags input control wouldn't have to do that at several places. Of course, each control would be able to locally override global options by simply re-setting them.

Licensing of code?

Please add the licensing under which you are sharing this code!

Thanks!

Autocomplete issue

Support for array of objects as a list of tags

Currently the directive only supports arrays of strings as a list of tags. Although that probably covers most use cases, it could also support an array of objects so applications that have a list like this

[
    { id: 1, name: 'Tag 1' },
    { id: 2, name: 'Tag 2' },
    { id: 3, name: 'Tag 3' }
]

wouldn't need to convert it to an array of strings in order to use ngTagsInput. That introduces a new problem, though. Since a tag now carries more information than just its "name", a user won't be able to create a new tag by simply typing a string. Adding a tag will only be possible by selecting an autocomplete suggestion.

Option to complete tags programmaticaly

Great project! Helped us remove jQuery.

We're seeing users type a tag (email addresses in our case) and then click 'Send' without typing comma or enter to complete the tag. Is there a way we can read any text in progress, or force tag completion?

Support for Angular 1.2+

Currently the directive is incompatible with Angular 1.2+ and it only works with 1.0.x versions. I'm aware of two issues so far:

  • ngTransclude has changed in v1.2 and now it removes any existing content of the element it is applied to. And since it's placed on the ngTagsInput's main element, it wipes the directive out of the DOM;
  • element.scope() no longer retrieves the isolate scope of an element; element.isolateScope() should be use instead. That basically breaks all unit tests using scope();

But I think it won't stop there...

Minification process of script files can be improved

Minification of script files can be improved by doing at least two things:

  • Removing empty spaces from template strings;
  • Replacing angular.module('tags-input') with a shared variable.

Both should be done during the build process so the code remains legible.

Complete selected tags

When selecting an autocomplete tag (using the mouse or enter), it'd be great if it appeared in the text input as a tag rather than editable text. Could be an option if some need it to be editable.

Visual feedback for duplicate tags

Currently when one tries to add a duplicate tag, ngTagsInput simply doesn't allow it, without any feedback whatsoever. It would be nice if there were some kind of visual feedback so the user could understand what had just happened.

defaults passed as attributes should be bindable

Some of the defaults can be dynamic, like a placeholder.
Not, once values not mentioned in tagsInput scope, they are treated as plain text.
There should be a way to make config dynamic, bindable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.