title: Angular cli generate a service and include the provider in one step
body: <p>It is possible generate a service with angular cli and add it as a <strong>provider</strong> in the <strong>app.module.ts</strong> in a single step or using an special option in the <strong>ng g service</strong> command?</p>
  
  <p>When a execute:</p>
  
  <pre><code>$ ng g service services/backendApi
  installing service
    create src/app/services/backend-api.service.spec.ts
    create src/app/services/backend-api.service.ts
    WARNING Service is generated but not provided, it must be provided to be used
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ZZwBC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZZwBC.png" alt="WARNING Service is generated but not provided, it must be provided to be used"></a></p>
  
  <p>Next to it, (and according to the WARNING message) I usually add it to <strong>provider</strong> section on <strong>app.module.ts</strong> using the text editor:</p>
  
  <pre><code>@NgModule({
    declarations: [
      AppComponent,
      ...
    ],
    imports: [
      ....
    ],
    providers: [BackendApiService],
    bootstrap: [AppComponent]
  })
  </code></pre>
  
  <p>It is possible to do it with a single step, to automatize this?</p>