I have been putting in a lot of effort to make this work. Despite my knowledge about child scopes, prototypal inheritance, and the use of dot notation for the model, I am facing an issue with resetting the form. You can access the hosted form here. The relevant code can be found here. I need assistance in resetting the form scope variable. Currently, my approach is as follows:
if(data==1){
if($scope.form.language=='English'){
toastr.success('Form has been submitted successfully', 'Success');
}
else{
toastr.success('הטופס נקלט בהצלחה', 'הצלחה');
}
form={};
console.log('Empty is'+empty);
}
I am struggling to identify what error I might be making. Additionally, this is how I set up my form variable initially.
.controller('formCtrl', function($scope,$location,$translate,$filter) {
$scope.form={};
$scope.currentLang='en';
$scope.form.createdate=new Date();