Angularjs表单在提交时不能清除

我正在尝试清除表单提交后我的angularjsforms。 我已经得到了正确提交的forms,但在我的函数提交表单,我已经试图通过定位$scope.[name of field here] = '';清除我的表单的input字段$scope.[name of field here] = '';

有人能帮我理解为什么吗?

这里是我的控制器提交function的代码:

 $scope.submitOwner = function(){ $scope.firstName = ''; $scope.lastName = ''; $scope.age = ''; $scope.location = ''; $scope.favorite = ''; $scope.numberOfBreeds = ''; $scope.numberOfDogs = ''; Owner.create($scope.owner).success( function(){ console.log('User created!') }); 

所以我做了保罗在评论中提出的改变,并且让它起作用! 表单使用的是“所有者”模型,我只是简单地改变了字段,以便在范围内定位ng模型名称,并成功清除它! 这是更新的代码:

  $scope.owner = {}; 

现在表单成功清除。 感谢您为我清除保罗!