title: Angular 5 Subscribe not a function
body: <p>Angular return a error : Error: Uncaught (in promise): TypeError: res.users.subscribe is not a function.</p>
  
  <p>Since this morning, I don't understand what's wrong in my resolve.</p>
  
  <p>UserService.ts</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient, HttpHeaders } from '@angular/common/http';
  import { Observable } from 'rxjs/Observable';
  
  @Injectable()
  export class UsersService {
  
      private api = 'http://localhost:3000/users';
      private headers = new HttpHeaders();
  
      constructor(
          private http: HttpClient
      ) {}
  
       getAllUsers(): Observable&lt;any[]&gt; {
           return this.http.get&lt;any[]&gt;(this.api, {headers: this.headers, responseType: 'json' });
      }
  }
  </code></pre>
  
  <hr>
  
  <p>UserResolve.ts:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Resolve } from '@angular/router';
  import { UsersService } from '../services/users.service';
  
  @Injectable()
  export class UsersResolve implements Resolve&lt;any&gt; {
  
      constructor(private usersService: UsersService) {}
  
      resolve() {
         return this.usersService.getAllUsers();
      }
  }
  </code></pre>
  
  <hr>
  
  <p>UserComponent.ts</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { ActivatedRoute } from '@angular/router';
  
  import {Users} from '../_shared/models/Users';
  
  @Component({
    selector: 'app-user',
    templateUrl: './users.component.html',
    styleUrls: ['./users.component.sass']
  })
  
  export class UsersComponent implements OnInit {
  
      constructor(private route: ActivatedRoute) {}
  
      public title: string;
      public users: Users[] = [];
  
      ngOnInit() {
          this.route.data.forEach((res: any): any =&gt; {
             this.title = res.title;
             res.users.subscribe(users =&gt;  {
                console.log(users);
                this.users = users;
             });
          });
      }
  }
  </code></pre>
  
  <p>When I log res.users, it return "function UsersResolve()" with not <strong>proto</strong> subscribe...</p>
  
  <p>The json is Array of Object like :</p>
  
  <pre><code>{
    id: 13246,
    guid: '46ffgd456dfs',
    name: 'John Doe',
    adress: ...
  }
  </code></pre>
  
  <p>Can the problem come from the contents of my json ?</p>
  
  <p>Originally, I wanted to train on the RxJS operator...</p>