From a child component, using angular output, I am emitting a string value. What I want that, in the parent component, I will receive that string and will concatenate with the existing value.
parent component has a variable called customValue: string;
Now these peice of code is working customValue = customValue+ $event +' '
<parent>
<child (stringValue)="customValue = customValue+ $event +' '"> </child>
</parent>
But if i try to concanate like this: customValue += $event +' '
then its not working.
<parent>
<child (stringValue)="customValue += $event +' "> </child>
</parent>
Can someone please tell me why the above string concatenate is not working?
please note: I really do not want to create a function. Is there any way that without creating a function I can achieve what I desire for?