Angular 2 prevent enter from submitting in template-driven form : <p>I have forms that uses the template-driven blueprint, so something like this:</p>

<pre><code>&lt;form #myForm="ngForm" ngSubmit="save(myForm.value, myForm.isValid)"&gt;
  &lt;input #name="ngModel" [(ngModel)]="name"&gt;
  &lt;button type="submit"&gt;Submit form&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>Now, how can I prevent ENTER from submitting the form? It interferes with custom ENTER behaviour inside of the form and also if you accidentally press enter in an input, which is unwanted.</p>

<p>I've looked around and found some old Angular 1 answers and also some standard JavaScript ones but I feel that Angular 2 must have something like this already built in but I haven't been able to find it.</p>

<p>If they don't, what would be the best way to achieve this?</p>
