Maison > Questions et réponses > le corps du texte
前台这样的: <li ng-click="$scope.getCoachsByExperience(1,3)">1-3年</li>
后台: $scope.getCoachsByExperience=(a,b)->
value=[]
for coach in coachs
if coach.Experience >a and coach.Experience<=b
value.push coach
$scope.coachs=value
$scope.totalCount=data.TotalCount
$scope.getCoachsByExperience(a,b)
报错:ReferenceError: a is not defined
然后现在报错是找不到:a,b
我的想法是点击1-3年就可以列出列表了
怎么把 <li ng-click="$scope.getCoachsByExperience(1,3)">1-3年</li> 当中的ng-click="$scope.getCoachsByExperience(1,3)" 1,3 传到 后台a,b 现在取不到a,b的值搞不来 ,哪里想错了,调试都跳不进去,求大神点拨