title: submit, keyup.enter not working on angular 10
body: <p>I am learning angular from basic in my code I want to send text from text box on <code>enter</code> to function when I tried with just <code>keyup</code> <code>keydown</code> it was working fine but when try to use <code>submit</code> <code>keyup.enter</code> the whole component disappear</p>
  <p>diagnos.component.html:</p>
  <pre><code>&lt;input type=&quot;text&quot; #nameText (keyup.enter)=&quot;addItem(nameText.value)&quot;&gt;
  &lt;ul&gt;
    &lt;li *ngFor=&quot;let name of names&quot;&gt;{{name}}&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  <p>diagnos.component.ts:</p>
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
    selector: 'app-diagnos',
    templateUrl: './diagnos.component.html',
    styleUrls: ['./diagnos.component.css']
  })
  export class DiagnosComponent implements OnInit {
    names = ['abc','xyz'];
    constructor() { }
    ngOnInit(): void {
      
    }
    addItem(val){
      this.names.push(val);
    }
  
  }
  </code></pre>
  <p>idle page:
  <a href="https://i.stack.imgur.com/eifs1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eifs1.png" alt="enter image description here" /></a></p>
  <p>when used <code>keyup</code> only:
  <a href="https://i.stack.imgur.com/sy2sX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sy2sX.png" alt="enter image description here" /></a></p>
  <p>when used <code>keyup.enter</code> or <code>submit</code> after pressing <code>enter</code> or submitting:
  <a href="https://i.stack.imgur.com/ANxQ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ANxQ0.png" alt="enter image description here" /></a></p>
  <p>after enter or submit whole component disappeared even that <code>ul</code> also and had tried logging on console if that function get call or not but that function doesn't call</p>
  <p>my project link : <a href="https://github.com/ladbhupesh/angularapp" rel="nofollow noreferrer">https://github.com/ladbhupesh/angularapp</a></p>