title: Type 'void' is not assignable to type 'User[]'
body: <p>I can not understand this error ,
  why it won't allow me to post data to users array so i can access it from the html ?</p>
  
  <p>this is the component</p>
  
  <pre><code>export class Service1Component implements OnInit {
  
    selectedUser: User;
    users: Array&lt;User&gt;;
  
   constructor(private _userService: UserService) { }
  
   ngOnInit() {
     this._userService.getUsers()
     .subscribe(resUserData =&gt; {
       this.users = resUserData
     });
   }
  
   onSelectUser(user:any){
     this.selectedUser = user;
   }
  }
  </code></pre>
  
  <p>this is the service i want to subscribe to </p>
  
  <pre><code>export class UserService {
  
   private _getUrl = '/api/users'
  
   constructor(private _http: Http) { }
  
   getUsers(){
     return this._http.get(this._getUrl)
     .map((response: Response) =&gt; {
       response.json();
     })
   }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/1vbyJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1vbyJ.png" alt="enter image description here"></a></p>