Closed Zettersten closed 8 years ago
<script type="text/ng-template" id="partials/modal.html"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="closeModal()">×</button> <h4 class="modal-title">Modal title</h4> </div> <div class="modal-body"> <p>One fine body…</p> <input type="text" ng-model="hello"> {{hello}} </div> <div class="modal-footer"> <button type="button" class="btn btn-danger" data-dismiss="modal" ng-click="closeModal()">Close</button> <button type="button" class="btn btn-success">Save changes</button> </div> </script>
Now hit "enter" inside the input element....
Everything goes to shit.
It's probably because of the ng-click on your buttons. Try changing your "save changes" button from type=button to type=submit, this way angular should activate this one and not the close button
type=button
type=submit
Now hit "enter" inside the input element....
Everything goes to shit.