Which Angular CLI command is used to generate a new service?

  • ng create service
  • ng generate service
  • ng make service
  • ng new service
To generate a new service in an Angular application, you should use the ng generate service command. This command creates the service file, sets up the necessary imports, and registers the service with the Angular dependency injection system.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *