title: TypeError: Cannot read property of undefined when I call a method from an Imported Class [TypeScript]
body: <p>After debugging this for few hours, I couldn't find anything online either..</p>
  
  <p>I have a controller that call a service method to get data back:</p>
  
  <p><strong>Route: routes/inspections.ts</strong></p>
  
  <pre><code>import {Request, Response} from "express";
  import { InspectionsController } from "../controllers";
  
  export class Routes {
  
      public inspectionsController: InspectionsController = new InspectionsController()
      public  routes(app): void {
  
  
          // Inspection detail
          app.route('/data/inspections/:inspectionId')
          // get specific inspection
              .get(this.inspectionsController.getInspectionByID)
  
          // Inspection detail
          app.route('/data/inspections')
          // get specific inspection
              .get(this.inspectionsController.getInspections)
  
      }
  }
  </code></pre>
  
  <p><strong>Controller: controllers/inspections.ts</strong></p>
  
  <pre><code>    import { Request, Response } from 'express';
      import { InspectionsService } from '../services/inspections';
  
      export class InspectionsController {
          public inspectionsService: InspectionsService = new InspectionsService();
          public async getInspections (req: Request, res: Response) {
              try {
                  const response = await this.inspectionsService.getInspections();
                  res.json(response);
              }catch (e) {
                  console.log(e.toString())
              }
          }
  
          public getInspectionByID (req: Request, res: Response) {
              res.json('You reached getInspectionByID in the controller Wohoooo!');
          }
  }
  </code></pre>
  
  <p><strong>Service: services/inspections.ts</strong></p>
  
  <pre><code>    export class InspectionsService {
       public  async getInspections(){
           return 'You reached getInspections in the service Wohoooo!';
      }
  }
  </code></pre>
  
  <p>My problem is that my program reach only the controller level, and does not reach the service. 
  I get the following error message: </p>
  
  <pre><code>TypeError: Cannot read property 'inspectionsService' of undefined
  </code></pre>
  
  <p>Many thanks in advance guys, any help is truly appreciated!</p>