Javascript 角度ui标记将数组转换为字符串

Javascript 角度ui标记将数组转换为字符串,javascript,angularjs,angular-ui,tagging,Javascript,Angularjs,Angular Ui,Tagging,我在模板中使用指令,绑定在属性设置为字符串的对象上。由于ui-select将在属性中将值保存为Array,是否可以在模型中自动转换该值,以便在保存时该值将为字符串?我尝试了ng value=“model.property.join(',')”,但没有效果 元件的完整代码: <ui-select multiple tagging tagging-label="false" theme="bootstrap" ng-model="user" ng-value="user.keywords.jo

我在模板中使用指令,绑定在属性设置为字符串的对象上。由于
ui-select
将在属性中将值保存为
Array
,是否可以在模型中自动转换该值,以便在保存时该值将为字符串?我尝试了
ng value=“model.property.join(',')”
,但没有效果

元件的完整代码:

<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>

{{$item}}
{{关键字}}
当我保存对象时,它将关键字发送为:
[“关键字”,“其他”]