How to make all api call in separate ts file?

Hi, i would like to have all loaders, pop ups alerts in separate Ts that i can reuse the same for all files.I tried this by creating service.but received the error as “Can’t resolve all paramters as class name”.?
Thanks in advance.