why doesn’t hitting enter when a SELECT is focused submit the form?

It’s simply the nature of the control. The Enter key (or a mouse click) is what makes the selection. To submit the form when pressing Enter would result in a poor user experience, since the form would essentially be unusable. I would not recommend changing the behavior via JavaScript, simply because the default behavior is … Read more

Can I trigger a form submit from a controller?

You can add submit method to a FormController. I did so: <form ng-form-commit action=”https://stackoverflow.com/” name=”payForm” method=”post” target=”_top”> <input type=”hidden” name=”currency_code” value=”USD”> <button type=”button” ng-click=’save(payForm)’>buy</button> </form> .directive(“ngFormCommit”, [function(){ return { require:”form”, link: function($scope, $el, $attr, $form) { $form.commit = function() { $el[0].submit(); }; } }; }]) .controller(“AwesomeCtrl”, [“$scope”, function($scope){ $scope.save = function($form) { if ($form.$valid) { … Read more

Stripe not working with error ‘Uncaught (in promise) Error: We could not retrieve data from the specified Element.’

Please try this. It works. <html> <head> <style> /** * The CSS shown here will not be introduced in the Quickstart guide, but shows * how you can use CSS to style your Element’s container. */ .StripeElement { box-sizing: border-box; height: 40px; padding: 10px 12px; border: 1px solid transparent; border-radius: 4px; background-color: white; box-shadow: 0 … Read more