123
rated 0 times
[
129]
[
6]
/ answers: 1 / hits: 55377
/ 11 Years ago, wed, january 1, 2014, 12:00:00
I have a reset function in angular to clear all the fields in a form. If I do something like:
<a href=# ng-click=resetForm()>reset</a>
$scope.resetForm = function() {
$scope.someForm = {};
}
Everything works fine. But I want to use this function for multiple forms on the site. If I pass the form object in like:
<a href=# ng-click=resetForm(someForm)>reset</a>
$scope.resetForm = function(form) {
$scope.form = {};
}
Then it won't work. Can someone explain to me why this would be happening?
More From » forms