javascript - Angular-ui tagging convert array to string -


i using ui-select directive in template, bound on object has property set string. since ui-select save values array in property, possible transform value automatically in model when save value string? tried ng-value="model.property.join(',')" has no effects.

the complete code of element:

<ui-select multiple tagging tagging-label="false" theme="bootstrap" ng-model="user" ng-value="user.keywords.join(',')">   <ui-select-match placeholder="keywords">{{$item}}</ui-select-match>   <ui-select-choices repeat="keyword in user.keywords | filter:$select.search">{{keyword}}</ui-select-choices> <ui-select> 

and when save object sends keywords as: ["keyword", "other"]


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -