Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not possible to bind through ng-model #20

Open
josevillacreses opened this issue Feb 12, 2015 · 1 comment
Open

Not possible to bind through ng-model #20

josevillacreses opened this issue Feb 12, 2015 · 1 comment

Comments

@josevillacreses
Copy link

I've trying to use ng-model="aModel" inside js-tag element. But nothing gets bound.
With this code, as in the examples, I can get the value selected through $scope.tags.tags:

$scope.tags = new JSTagsCollection([]);
$scope.jsTagOptions = {
  'tags': $scope.tags,
  "texts": {
    "inputPlaceHolder": "diag..."
  },
  'edit': false,
  'breakCodes': [13, 32] //32 for space
};

The format of the value of $scope.tags.tags I get is

{"0":{"value":"first","id":0},"1":{"value":"next","id":1}}

The keys "0", "1" and the property "id" need some explanation.

Thank for opening your code. It's been of great value for me.

@eranhirs
Copy link
Owner

Thank you for opening this issue, both will be fixed.
As you saw in the documentation there is currently another way to access the JSTagCollection object and the tags inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants