Hi all,
html file:
<form id="uploadForm" method="post">
<input type = "file">
<input type="submit" value="OK">
</form>
controller.js
$("#uploadForm").submit(function (e) {
e.preventDefault();
var formData = new FormData();
formData.append(‘file’, $(‘input[type=file]’)[0].files[0])
//some code for uploading a file
$state.reload();
})
The problem is that when I upload file first time it works well, after reloading a state submit button doesn’t react. What could be a reason for that?