title: How to call custom service inside another services in angular 6
body: <p>How to call the custom service in another custom service in angular 6</p>
  
  <p>I have created two service user.services.ts and counter.services.ts </p>
  
  <p>Getting error : Cannot invoke an expression whose type lacks a call signature. Type 'Number' has no compatible call signatures</p>
  
  <p>Even try to add service name in app.modules providers array but same error getting </p>
  
  <p>user.services.ts</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { CounterService } from './counter.service';
  
  @Injectable({
    providedIn: 'root',   
  })
  export class UserService {
  
  activeUsers = ['Max', 'Anna'];
  inactiveUsers = ['Chris', 'Manu'];
  
  constructor(private counterSer: CounterService) { }
  
   setUserActive(id: number) {
    this.activeUsers.push(this.inactiveUsers[id]);
    this.inactiveUsers.splice(id, 1);
    this.counterSer.activeToInactiveCounter();
  }
  
   setUserInactive(id: number) {
    this.inactiveUsers.push(this.activeUsers[id]);
    this.activeUsers.splice(id, 1);
   }
  }
  </code></pre>
  
  <p>Counter.services.ts</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  
  @Injectable({
     providedIn: 'root'
  })
  export class CounterService {
  
   constructor() { }
  
   activeToInactiveCounter = 0;
   inactiveToActiveCounter = 0;
  
   incrementActiveToInactive() {
     this.activeToInactiveCounter++;
     console.log(this.activeToInactiveCounter);
   }
  
   incrementInactiveToActive() {
     this.inactiveToActiveCounter++;
     console.log(this.inactiveToActiveCounter);
   }
  }
  </code></pre>