In the Angular2 component configuration providers is one of the keys that we could specify. How are these providers defined and what are they used for?
providers
import { service_name} from '../path'; @Component({ selector: 'selector_name', templateUrl: './html file name ', styleUrls: ['./css file name '], providers: [ ./'service_name']; }) export class AppComponent { constructor(private Service_name: service_name) { //enter code here }