Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.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
Javascript 未在控制器中访问ng模型值_Javascript_Jquery_Angularjs - Fatal编程技术网

Javascript 未在控制器中访问ng模型值

Javascript 未在控制器中访问ng模型值,javascript,jquery,angularjs,Javascript,Jquery,Angularjs,我的页面上有一个mult select。 我正在用PlanGroupData.EmploymentStatus.Ids.Id中的数据绑定它, 现在点击保存按钮,我想得到multi-select的选定值。 但它给了我一个空数组 <multiselect ng-attr-name="GetStatus" ng-required="true" class="input- xlarge" multiple="true" ng-model="EmpStatus" options="c._Valu

我的页面上有一个mult select。 我正在用
PlanGroupData.EmploymentStatus.Ids.Id
中的数据绑定它, 现在点击保存按钮,我想得到multi-select的选定值。 但它给了我一个空数组

<multiselect ng-attr-name="GetStatus" ng-required="true" 
class="input-  xlarge" multiple="true" ng-model="EmpStatus" options="c._Value for c in PlanGroupData.EmploymentStatus.Ids.Id"></multiselect>
点击按钮,我调用了一个函数,在这个函数里面

alert($scope.EmpStatus);

但是它是一个空数组。

什么是“multiselect”?它就像一个复选框列表控件html中没有“multiselect”元素。你在使用什么样的插件模块?你有你使用的库吗?通常对于多选,您会使用:
<multiselect ng-attr-name="GetStatus" ng-required="true" 
class="input-  xlarge" multiple="true" ng-model="EmpStatus" options="c._Value for c in PlanGroupData.EmploymentStatus.Ids.Id"></multiselect>