Service in angular is just a class so you can inject any class to any class
Utility
import { Injectable } from '@angular/core';
@Injectable({providedIn:'root'})
export class Utility {
constructor(){
console.log('Utility is created');
}
}
MyServiceService
import { Injectable } from '@angular/core';
import {Utility} from './utility'
@Injectable({providedIn:'root'})
export class MyServiceService {
constructor(private uitl:Utility) { }
}
{providedIn:'root'}
in a feature in angular 6 another way is to add MyServiceService , Utility to providers array in app.module.ts in that case you can remove @Injectable decorator in Utility class
demo - check the console