问题
What is the best practices in angularjs when submitting file without a submit button. Here is my sample code.
<form method="post" enctype="multipart/form-data" action="">
<input type="file" name="file">
</form>
I already tried using onchange, very useful also but what i want is after selecting a file it will make an ajax call (without submit button).
回答1:
i have used ngpload module for it.
ngpload
please refer the document from the link this will definitely help you a lot
来源:https://stackoverflow.com/questions/35332886/uploading-file-in-angularjs-without-submit-button