Html &引用;TypeError:v2.email不是一个函数;

Html &引用;TypeError:v2.email不是一个函数;,html,angularjs,Html,Angularjs,此函数在我第一次调用它时起作用,但在以后的第二次调用时出现此错误 一旦我刷新它,它就会重新开始工作 安格拉斯 $scope.email = function(){ $scope.email=$scope.user.email; data = { "email": $scope.email } console.log(data); $http.post("http://localhost:8080/"+url2, data, config).then( f

此函数在我第一次调用它时起作用,但在以后的第二次调用时出现此错误
一旦我刷新它,它就会重新开始工作

安格拉斯

 $scope.email = function(){
    $scope.email=$scope.user.email;
    data = { "email": $scope.email }
    console.log(data);
    $http.post("http://localhost:8080/"+url2, data, config).then(
    function(response){
        console.log(response);
        $scope.reply = response.data;
        },
        function(response){
            console.log(response);
        });
}
HTML


 电子邮件:

您在
$scope.email中的匿名函数重新定义并覆盖实际的
$scope.email
函数属性。您有命名冲突


将函数重命名为
$scope.getEmail()

您在
$scope.email
中的匿名函数重新定义并覆盖实际的
$scope.email
函数属性。您有命名冲突


将函数重命名为类似于
$scope.getEmail()

的名称,因为函数email与scope变量email冲突。。重命名任何一个,它都应该工作感谢@Jenny它现在工作我想是因为函数email与范围变量email冲突。。重命名任何一个都可以,谢谢@Jenny,现在可以了
  <div class="form-group">
    <label class="control-label">&emsp;Email:</label><br>
    <div class="col-lg-10">
      <input class="form-control" type="text" ng-model="user.email" placeholder="something@example.com">
      <a href="" ng-click="email()">(Change)</a>
    </div>
  </div>