title: InMemoryWebApiModule - status: 404 - collection not found
body: <p>I'm trying to use angular2 InMemoryWebApiModule and implement the InMemoryDbService, to create a mock-up of my backend server. I configured it as (I thought) it should be, but somehow I can't reach the data structure that implement the InMemoryDbService (WorkerData in worker.ts) and keep getting status 404 ("Collection 'workers' not found"). I've simplified the code to make it clearer. This is a URL issue - can't figuring out why.</p>
  
  <p>The problem occurs when executing the getWorkrs function in the service.
  See my code:
  App.module.ts:</p>
  
  <pre><code>import { WorkerData } from './Services/worker';
  import {InMemoryWebApiModule } from 'angular-in-memory-web-api';
  @NgModule({
   imports: [ BrowserModule, HttpModule, ReactiveFormsModule, FormsModule, 
      RouterModule, routes, InMemoryWebApiModule.forRoot(WorkerData) ],
   declarations: [ ... ],
  providers: [ WorkerService],
  bootstrap: [ AppComponent ]
  })
  export class AppModule { }
  </code></pre>
  
  <p>worker.ts:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { InMemoryDbService,RequestInfo } from 'angular-in-memory-web-api';
  
  export interface IWorker
  {
      id: number;
      IDNumber: number;
      FirstName?:string;
      LastName?:string;
      Email? : string;
      DateOfBirth?: string;
      PhoneNumber1?: string;
      PhoneNumber2?: string;
      Street1? :string;
      Street2?: string;
      City?: string;
      Zip?:number;
      General_Additional_Data?: string;
  }
  
   @Injectable()
   export class WorkerData implements InMemoryDbService
   {
       createDb()
       {
         let workers = 
          [{
           "id": 1,
           "IDNumber": 289156,
           "FirstName":"qqqqqq",
           "LastName":"cccccc",
           "DateOfBirth": "02/11/1991",
           "PhoneNumber1": "3422-088808",
           "PhoneNumber2":"3234-6321223",
           "General_Additional_Data": "qqqqqqqqqqqqq"
       },
       {
           "id": 2,
           "IDNumber": 289157,
           "FirstName":"aaaaaaa",
           "LastName":"bbbbbbb",
           "DateOfBirth": "05/11/1981",
           "PhoneNumber1": "02328-08434348",
           "PhoneNumber2":"052322-63213434",
           "General_Additional_Data": "efefsdfsdfs"
       },
       {
           "id": 3,
           "IDNumber": 289466,
           "FirstName":"aaaaa",
           "LastName":"bbbbbb",
           "DateOfBirth": "05/1/1991",
           "PhoneNumber1": "0328-45634348",
           "PhoneNumber2":"3232-7613434",
           "General_Additional_Data": "aaaaaaaaaaaaaaaaa"
       }];
       return workers;
   }
   }
  
  
  export class Worker implements IWorker{
  
  constructor(
      public id =-1,
      public IDNumber = -1,
      public FirstName?:string,
      public LastName?:string,
      public Email? : string,
      public DateOfBirth?: string,
      public PhoneNumber1?: string,
      public PhoneNumber2?: string,
      public Street1? :string,
      public Street2?: string,
      public City?: string,
      public Zip?:number,
      public General_Additional_Data?: string
  ){}
  
  }
  </code></pre>
  
  <p>WorkerService.service (in the same folder as the worker.ts above is):</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http, Response} from '@angular/http';
  import { Observable } from 'rxjs/Observable';
  
  import { IWorker, WorkerData } from './Services/worker';
  import 'rxjs/add/operator/catch';
  import 'rxjs/add/operator/do';
  import 'rxjs/add/operator/map';
  import 'rxjs/add/observable/of';
  
  @Injectable()
  
  export class WorkerService
  {
      private _workerURL = 'api/workers';
      constructor (private _http: Http){}
          getWorkers(): Observable&lt;IWorker[]&gt;
          {
              return this._http.get(this._workerURL)
                         .map((response : Response) =&gt; &lt;IWorker[]&gt; 
                          response.json())
                          .do(data =&gt; console.log('All: ' + 
                          JSON.stringify(data)))
                         .catch(this.handleError);
         }
  </code></pre>