title: Using Angular Service with multiple internal dependencies in a model class
body: <p>i have a model class, which takes one argument "id" in it's constructor, but the title are in a map in a different service. let's call it name service. i want to set the Item's title when it's new instance is being created. following approach won't work is Item is not an angular class.</p>
  
  <pre><code>export class Item {
    id: string;
    title: string;
  
    constructor(id: string, private nameService: NameService) {
      this.id = id;
      this.title = nameService.nameDictionary[id];
    }
  
  }
  </code></pre>
  
  <p>I can pass the service instance in constructor but i don't what to do that as class Item is being used from many places and i don't want to pass NameService object from constructor. </p>
  
  <p>NameService have several internal dependencies as well.</p>
  
  <pre><code>@Injectable({
    providedIn: 'root'
  })
  export class NameService {
  
    nameDictionary: any = {};
  
    constructor(private config, private lib: LibraryService, private util: UtilityService) {
  
    }
  }
  </code></pre>
  
  <p>Can anyone please guide me how can i set the title field from NameService on Item Class instantiation?
  Thanks</p>