title: Submit form on pressing Enter with AngularJS
body: <p>In this particular case, what options do I have to make these inputs call a function when I press Enter?</p>
  <p>Html:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;form&gt;
      &lt;input type=&quot;text&quot; ng-model=&quot;name&quot; &lt;!-- Press ENTER and call myFunc --&gt; /&gt;
      &lt;br /&gt;
      &lt;input type=&quot;text&quot; ng-model=&quot;email&quot; &lt;!-- Press ENTER and call myFunc --&gt; /&gt;
  &lt;/form&gt;
  </code></pre>
  <pre class="lang-js prettyprint-override"><code>// Controller //
  .controller('mycontroller', ['$scope',function($scope) {
      $scope.name = '';
      $scope.email = '';
      // Function to be called when pressing ENTER
      $scope.myFunc = function() {
         alert('Submitted');
      };
  }])
  </code></pre>