The post Generate Service using Angular CLI appeared first on OctopusCodes.
]]>
Type the command “ng generate service product” on the command prompt to generate ProductService.

Angular CLI will generate 2 files in the app folder:

To generate service in a specific folder, type the command “ng generate service services/product” on the command prompt to generate ProductService in services folder.

Angular CLI will generate 2 files in the services folder:

The post Generate Service using Angular CLI appeared first on OctopusCodes.
]]>