Use providers without specifying it in constructors


#1

Hi All,

How could we use services or providers without specifying it in constructors, example

constructor(public navCtrl: NavController, params: NavParams, public testService: TestService, public valueService: ValueService) {

}

Where in the Component annotation we would have

@Component({
  selector: 'list-page',
  templateUrl: 'list.html',
  providers: [TestService, ValueService]
})

Where the constructor could get large simply due to the number of services used.


Use service without constructor parameter