title: Nodejs | Exhange Data Between Controllers
body: <blockquote>
    <p>I have my PlantsController where I get the Plants like this:</p>
  </blockquote>
  
  <pre><code>function getAll() {
    const plants= HttpRequestPromise.get(config.ApiURL+'allPlants', config.head);
    return plants;
  }
  
  export class PlantsController {
    ...
    public getPlants() {
      return async (req: Request, res: Response, next?: NextFunction): Promise&lt;Response&gt; =&gt; {
        try {
          const plants = await getAll();
          return res
            .status(OK)
            .send(plants);
        } catch (e) {
          next(e);
        }
      };
    }
    ...
  }
  export default new PlantsController();
  </code></pre>
  
  <blockquote>
    <p>I have PlantedActivitiesController where I get the PlantedActivities
    like this:</p>
  </blockquote>
  
  <pre><code>import plantsController from '../plants/plants.controller';
  export class PlantedActivitiesController {
    ...
    public getPlantedActivities(){
      return async (req: Request, res: Response, next?: NextFunction): Promise&lt;Response&gt; =&gt; {
        try {
  
  
          var plants = ?  // How can i get the plants from PlantsController?
                          // plantsController.get...?
  
          ...
  
  
        } catch (e) {
          next(e);
        }
      };
    }
    ...
  }
  </code></pre>
  
  <p><em>So, how can I get the plants to my PlantedActivitiesController?</em> </p>