1For Creating Service you have type command like below
2ng generate service service-name
3or
4ng g s service-name
5
6And if you want to make service into folder
7ng generate service /folder-name/service-name
8or
9ng g s /folder-name/service-name
1you can inject service in components constructor:
2constructor(public anyService: Service){}