title: Angular - two output-events in one component, but only one works
body: <p>I want the child component to emit two different events in it`s parent Component, depending on which button the user clicks. The first one (<em>onSelectedKat</em>) works fine. But the second one (<em>onAllClick</em>) doesn´t work. It has the same structure like the first one, I just changed the names.</p>
  
  <p>I tried to skip all the unnecessary code, so it doesn´t get too confusing.</p>
  
  <p>This is the html code of the child. It has two buttons, which call the two different functions on click. These functions in turn, call the emitter-functions.     </p>
  
  <pre><code>&lt;a (click)="selectKat(kategorie.name)" class="btn btn-default btn-kat" role="button"&gt;{{kategorie.name}}&lt;/a&gt;
  
  &lt;a (click)="clickAll()" class="btn btn-default btn-kat" role="button"&gt;Alle&lt;/a&gt;
  </code></pre>
  
  <p>This is the code of the child. Here it gets stuck in the <em>clickAll()</em> function. The console.log works, but everything after that doesn`t.</p>
  
  <pre><code>import { EintraegeComponent } from '../eintraege/eintraege.component';
  
  @Component({
    selector: 'app-kategorien',
    templateUrl: './kategorien.component.html',
    styleUrls: ['./kategorien.component.css'],
  
  })
  export class KategorienComponent implements OnInit {
  
    @Output() onSelectedKat = new EventEmitter&lt;string&gt;();
    @Output() onAllClick = new EventEmitter&lt;any&gt;();
  
    constructor() {}
  
    ngOnInit() {}
  
    selectKat(name: string){
      this.onSelectedKat.emit(name);
    }
  
    clickAll(){
      console.log("clicked in child works");
      this.onAllClick.emit();
    }
  
  }
  </code></pre>
  
  <p>And this is the code of the parent. However the <em>onAllClick()</em> in that one is never called.</p>
  
  <pre><code>@Component({
    selector: 'app-eintraege',
    templateUrl: './eintraege.component.html',
    styleUrls: ['./eintraege.component.css']
  })
  export class EintraegeComponent implements OnInit {
  
    eintraegegeordnet:boolean;
    toFilter:string;
  
    constructor() { 
        this.eintraegegeordnet = false;
      }
  
    ngOnInit() {}
  
    onAllClick(){
      console.log("Click in parent works");
      this.toFilter = "boo";
      this.eintraegegeordnet = false;
    }
  
    onSelectedKat(name:string){
      this.eintraegegeordnet = true;
      this.toFilter = name;
    }   
  
  }
  </code></pre>
  
  <p>Can anyone tell me what I´m doing wrong and why one of them works and the other doesn`t?</p>