Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

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

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

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading