我有这样的代码:
<div class="row"
ng-repeat="x in orders|orderBy:'order_id'| filter:{ paid: '0' } ">
<div class="col left">
{{changeTableIdtoName(x.table_id)}}
</div>
在app.js中:
$scope.changeTableIdtoName = function changeTableIdtoName(id) {
var url = "http://my.duangwifi.cn/yii2-basic/web/index.php?r=duangorder/resttable/view&id=" + id;
//console.log("url",url);
$http.get(url)
.success(function (response)
{
console.log("changeTableIdtoName",response);
console.log("response.name",response.name);
return response.name;
});
}
它说&#34;错误:[$ rootScope:infdig] 10 $ digest()迭代达成。中止&#34;
问题出在哪里?感谢。