title: How to pass an element to another component (easiest way)?
body: <p>I have a <code>string</code> in one of the components and I would like to send it to another component when the <code>submit</code> button is pushed. I found solutions (input, emit...) but none of them worked.</p>
  
  <p>This is my component from where I'd like to pass the variable:</p>
  
  <pre><code>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
    }
  }
  </code></pre>
  
  <p>Other component:</p>
  
  <pre><code>export class CvPageComponent implements OnInit {
    public cvData; // This should be equal with the value of "data"
  }
  </code></pre>