angular.js - angularjs 如何向coffeescript传值
習慣沉默
習慣沉默 2017-05-15 16:56:26
0
1
632

前台这样的: <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的值搞不来 ,哪里想错了,调试都跳不进去,求大神点拨

習慣沉默
習慣沉默

répondre à tous(1)
左手右手慢动作

??????????求大神

Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!