ionic generate service code example
Example 1: generate service ionic
ionic generate service path_to/service
Example 2: ionic cordova generate component
ionic generate component contact/form
for more details of cli commands
https://ionicframework.com/docs/cli/commands/generate