Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从ui-select2选定值中删除json格式并仅显示该值_Json_Angularjs_Ui Select2 - Fatal编程技术网

如何从ui-select2选定值中删除json格式并仅显示该值

如何从ui-select2选定值中删除json格式并仅显示该值,json,angularjs,ui-select2,Json,Angularjs,Ui Select2,我有一个ui-select2 select,它工作正常,但我需要将所选值格式化为此值、值、值。我就快到了。它的返回[值,值,值]。有没有办法把[,]从我的值中解析出来 <select ui-select2 multiple ng-model="selectedDa.value" data-placeholder="Select DA/'s" ngchange="updateDa()"> <option ng-repeat="da in da's" value="{{da.val

我有一个ui-select2 select,它工作正常,但我需要将所选值格式化为此值、值、值。我就快到了。它的返回[值,值,值]。有没有办法把[,]从我的值中解析出来

<select ui-select2 multiple ng-model="selectedDa.value" data-placeholder="Select DA/'s" ngchange="updateDa()">
<option ng-repeat="da in da's" value="{{da.value}}> {{da.label}}>/option>

</select>

是的,我有一个类似的应用程序,它使用select2,我实际上是在我的.php文件中这样做的,该文件由Angular服务通过$http调用:

此explode PHP函数将字符串在本例中的给定字符上拆分为几段,结果$query变量实际上是一个数组-数组'value1'、'value2'、'value3'、

$inputGet = $_GET['chosenValues'];
$query = explode(",", $inputGet);