Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Form submission doesn't work after reloading the state

$
0
0

@Isayev wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>