title: Why do I get property 'map' is undefined
body: <p>I have a service like this:</p>
  
  <pre><code>public getUsers() {
    return this.httpClient.get(environment.BASE_URL + `api/all`);
  }
  </code></pre>
  
  <p>And in component, I set the user to the ngx-bootstrap table</p>
  
  <pre><code>import { Component, OnInit, PipeTransform } from "@angular/core";
  import { UserService } from "./service.service";
  import { IUser } from "./users.model";
  import { Observable } from "rxjs";
  import { map } from "rxjs/operators";
  
  @Component({
    selector: "app-users",
    templateUrl: "./users.component.html",
    styleUrls: ["./users.component.css"]
  })
  export class UsersComponent implements OnInit {
    allUsers: IUser[];
    page = 1;
    pageSize = 4;
    collectionSize: any;
    constructor(private userService: UserService) {}
  
    ngOnInit() {
      this.userService.getUsers().subscribe((data: any[]) =&gt; {
        this.collectionSize = data.length;
        this.allUsers = data;
      });
    }
    get users(): IUser[] {
      // tslint:disable-next-line:max-line-length
      return this.allUsers.map((user, i) =&gt; ({ id: i + 1, ...user 
      })).slice((this.page - 1) * this.pageSize, (this.page - 1) * this.pageSize 
      + this.pageSize);
    }
  }
  </code></pre>
  
  <p>I always get error <code>TypeError: Cannot read property 'map' of undefined</code></p>
  
  <p>I tried to use <code>.pipe()</code>, but then I get <code>TypeError: Cannot read property 'pipe' of undefined</code></p>
  
  <p>In my DOM I get all data in the table, but only I have this error in console.</p>