Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.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 Angularjs在ng repeat中具有动态模型_Javascript_Jquery_Angularjs - Fatal编程技术网

Javascript Angularjs在ng repeat中具有动态模型

Javascript Angularjs在ng repeat中具有动态模型,javascript,jquery,angularjs,Javascript,Jquery,Angularjs,我有一段重复多次的工作代码 <div ng-controller="MyCtrl"> <div ng-repeat="item in test{{c}}.collection"> {{ item.hwTypeName }} </div> </div> 但这不起作用,有什么问题请帮忙 小提琴链接:你的小提琴有很多问题。设置未完成 看看我更新的小提琴,如果这是你要找的 绑定到视图的任何内容都应在$scope上定义,请遵循以

我有一段重复多次的工作代码

<div ng-controller="MyCtrl">
    <div ng-repeat="item in test{{c}}.collection">
      {{ item.hwTypeName }}
    </div>
</div>
但这不起作用,有什么问题请帮忙


小提琴链接:

你的小提琴有很多问题。设置未完成

看看我更新的小提琴,如果这是你要找的

绑定到视图的任何内容都应在$scope上定义,请遵循以下步骤:
function MyCtrl($scope) {
    $scope.searchParameters = {userName: '', userEmail: ''};

    var c=123;

   var test="test"+c



  $scope[test].collection = [{"ticketHardwareId":3817987,"requestId":3854951,"hwId":64543,"hwPrice":0,"assetId":"98ifgh","hwTypeName":"HW Type-1"}]


}