Command
generate
Description
I was curious if ng generate service would generate an @Injectable or @Service when I tried in today's nightly. It generated an @Injectable({providedIn: 'root'}).
This gave me an even more curious idea: will there be a Default vs Push vs Eager change detection naming sort of moment for the ng g service command? As in, there will now be a true "service" which people will want an ng g schematic for, but what about the ol' root injectable?
I don't know if there has been any comment on if @Service will be the new default, but I wanted to get this out there for open discussion.
Describe the solution you'd like
I see two options
- Make
ng g service give a follow up prompt on choosing injectable or service.
- Make
ng g service generate an actual @Service and then create a new ng g command for injectables
Personally, I don't have strong feelings at the moment.
Describe alternatives you've considered
Manually make @Service classes myself
Command
generate
Description
I was curious if
ng generate servicewould generate an@Injectableor@Servicewhen I tried in today's nightly. It generated an@Injectable({providedIn: 'root'}).This gave me an even more curious idea: will there be a Default vs Push vs Eager change detection naming sort of moment for the
ng g servicecommand? As in, there will now be a true "service" which people will want anng gschematic for, but what about the ol' root injectable?I don't know if there has been any comment on if
@Servicewill be the new default, but I wanted to get this out there for open discussion.Describe the solution you'd like
I see two options
ng g servicegive a follow up prompt on choosing injectable or service.ng g servicegenerate an actual@Serviceand then create a newng gcommand for injectablesPersonally, I don't have strong feelings at the moment.
Describe alternatives you've considered
Manually make
@Serviceclasses myself