title: want to get details of a specific user when clicked on button in Angular 4
body: <p>I have a table which has a button to view the details of specific user.</p>
  
  <p><a href="https://i.stack.imgur.com/NzXWj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NzXWj.png" alt="enter image description here"></a></p>
  
  <p>I'm retrieving data like this</p>
  
  <p>in html: </p>
  
  <pre><code>&lt;tr *ngFor="let userData of user?.users; trackBy: userThumb"&gt;
                  &lt;td&gt;{{ userData?.first_name }}&lt;/td&gt;
  </code></pre>
  
  <p>in ts:</p>
  
  <pre><code>ngOnInit() {
      this.http.get&lt;User&gt;('backend.url')
        .subscribe(data =&gt; {
          this.user = data;
          console.log(data);
        });
    }
  </code></pre>
  
  <p>When the view button is clicked, a modal opens and that should show user specific details. How can i achieve this? I tried using <code>this.user.id</code>
  to grab the user id but that returns undefined</p>