Home > Blockchain >  Not allowing me to pass false value while using child to parent component interaction
Not allowing me to pass false value while using child to parent component interaction

Time:02-11

Argument of type 'boolean' is not assignable to parameter of type 'string | symbol'.ts(2345)

cancel() {
this.cancelRegister.emit(false);
}

CodePudding user response:

Your are trying to pass a boolean value to an EventEmitter that is expecting a string or symbol.

Make sure that cancelRegister is defined like:

cancelRegister = new EventEmitter<boolean>();

OR leave it as is and pass a string value to emit

  • Related