I have a string
in one of the components and I would like to send it to another component when the submit
button is pushed. I found solutions (input, emit...) but none of them worked.
This is my component from where I'd like to pass the variable:
export class UsersComponent {
public data: string;
public exportDocument() { // This function is called, when the submit button is pushed!
this.data = doc.output("datauristring");
// I have no idea what to write here, to pass this variable
}
}
Other component:
export class CvPageComponent implements OnInit {
public cvData; // This should be equal with the value of "data"
}