Angular EventEmitter Error: Expected 0 type arguments, but got 1

Try importing EventEmitter from Angular instead of from protractor:

import { Component, OnInit, Output, EventEmitter } from '@angular/core';

I forgot to check my imports! Darn. I was using PROTRACTOR'S event emitter and not angular core Event Emitter

import { EventEmitter } from '@angular/core';
import { Component, OnInit, Output } from '@angular/core';
import { slideToRight } from '../../../../router.animations';
import { Router, ActivatedRoute, UrlSegment } from '@angular/router';

@Component({
  selector: 'app-new-user-input',
  templateUrl: './new-user-input.component.html',
  styleUrls: ['./new-user-input.component.css'],
  animations: [slideToRight()]
})
export class NewUserInputComponent implements OnInit {

  newUserInfoComplete = false;

  @Output() newUserInfoCompleteEvent = new EventEmitter<boolean>();

  constructor(private router: Router, r: ActivatedRoute) {
    r.url.subscribe((s: UrlSegment[]) => {
      console.log("url", s); //https://vsavkin.com/angular-router-understanding-router-state-7b5b95a12eab
    });
  }

  ngOnInit() {
  }



  sendNewUserInfoComplete() {
    this.newUserInfoCompleteEvent.emit(this.newUserInfoComplete);
  }


  displaySibling() {
    console.log(this.router);
    this.router.navigate(['../', { outlets: { newuserorginfo: ['newuserorginfo'] } }])
  }

  closeBlade() {
    this.router.navigate([{ outlets: { newuserinput: null } }]);
  }

}

245

Import EventEmitter from Angular instead of from stream:

import { Component, OnInit, Output, EventEmitter } from '@angular/core';

not this

import { EventEmitter } from 'stream'; “>”


You just got the imports wrong, you need to import EventEmitter from @angular/core

import { EventEmitter } from @angular/core