I have a form I'd like to deliver via AJAX :
<form class="form-inline ng-pristine" ng-submit="sendForm()" method="post" action="/sign_up" accept-charset="UTF-8">
$scope.sendForm = (e) ->
e.preventDefault ->
console.log 'sendForm()'
return false
The console.log
appears, and immediately it delivers the form.
It ignores both the e.preventDefault()
, and the return false
.
AngularJS reminds me of the honey badger. It just doesn't care.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…