ng g s services/log --module=app.module code example
Example: angular create a service
>>> ng generate service service_name
or
>>> ng generate service /folder-name/service-name
>>> ng generate service service_name
or
>>> ng generate service /folder-name/service-name