title: Understanding Angular2 Dependency Injection in modules
body: <p>I have written a feature module , and below is the code</p>
  
  <p><code>app.ticket.service.ts</code>, this is my service which i would  like to inject </p>
  
  <pre><code>'use strict';    
  import { Injectable } from '@angular/core' 
  
  Injectable()
  export class AppTicketService {    
  
      SaveTicket(): string {
  return "service saved ticket";
      }       
  
  }
  </code></pre>
  
  <p><code>app.tickets.module.ts</code>, this is my feature module</p>
  
  <pre><code>'use strict';
  import { NgModule } from '@angular/core';
  import { SharedModule } from '../shared/app.shared.module';
  import { AppCreatTicketComponent } from './app.create-ticket.component';
  //-- import services
  import { AppTicketService } from './app.ticket.service';
  
  //-- import routing
  import { ticketRouting } from './app.ticket.routing';
    @NgModule({
      declarations:[ AppCreatTicketComponent],
       imports:[ SharedModule,
                 ticketRouting],
       exports:[],
       providers:[AppTicketService]
   })
  
   export class TicketsModule { }   
  </code></pre>
  
  <p>app.create-ticket.component.ts , this is my component ,
  which belongs to feature module</p>
  
  <pre><code> 'use strict';
   import { Component , OnInit , Inject} from '@angular/core';    
  
   //-- import service
   import { AppTicketService } from './app.ticket.service';
  
   @Component({
   templateUrl: '/tickets/create'
   })
  
   export class AppCreatTicketComponent implements OnInit{
  
   ngOnInit(){}
  
   constructor(public service1 :AppTicketService) {
      let test = this.service1.SaveTicket();      
   }
  
   }
  </code></pre>
  
  <p>At runtime I am getting:</p>
  
  <blockquote>
    <p>"Can't resolve all parameters for AppCreatTicketComponent:" error in browser console</p>
  </blockquote>
  
  <p>What needs to be modified to resolve this issue?</p>