title: How to pass an object from one Component to another in Angular
body: <p>I am working on angular2 version. I have a grid in which i have edit button. I need to implement whenever i click on edit it should display other component and that object should be passed to that component. My view is as below:</p>
  
  <pre><code>  &lt;table class="table table-striped" width="50%"&gt;
    &lt;tr&gt; 
       &lt;td&gt;User Name&lt;/td&gt;
       &lt;td&gt;Email&lt;/td&gt;
       &lt;td&gt;Gender&lt;/td&gt;     
       &lt;td&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr *ngFor="let user of Users"&gt;
       &lt;td&gt;{{user.UserName}}&lt;/td&gt;
       &lt;td&gt;{{user.Email}}&lt;/td&gt;
       &lt;td&gt;{{user.Gender | transformgender }}&lt;/td&gt;
       &lt;td&gt;&lt;a  routerLink="/edituser" routerLinkActive="active"&gt;Edit&lt;/a&gt;&lt;/td&gt;  
    &lt;/tr&gt;
  &lt;/table&gt;
  &lt;a class="btn btn-primary" routerLink="/adduser" routerLinkActive="active"&gt;Add User&lt;/a&gt;
  </code></pre>
  
  <p>Now how can a pass user object to other component called edituser.component.ts.
  Please suggest.</p>