When creating a service using the Angular CLI, which command would you use?

  • ng serve
  • ng generate service
  • ng create service
  • ng build service
When creating a service in Angular using the Angular CLI, you would use the command ng generate service. This command generates the necessary files and boilerplate code for an Angular service, making it a convenient way to create services in an Angular project. The other options (ng serve, ng create service, ng build service) are not the correct commands for creating a service.
Add your answer
Loading...

Leave a comment

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