angularjs的http问题

html

<div class="alert" ng-show="myForm.phone.$invalid"><i class="icon ico-msg"></i>{{hint1}}</div>

js

Myapp.controller("Login",function($http,$scope){
    /*$scope.sendCaptcha=function(){*/
        $http.post("response/sendCaptcha.json"
        ).success(
            hint1='请输入正确验证码'
            )
})

总是提示我fn is not function 这是为什么呢?

阅读 3.1k
1 个回答

语法问题,success回调里是有个方法function

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题