Each component can specify new Providers using its providers property in ComponentMetadata.
Is there a way to specify provider
I've done it in the bootstrap part.
bootstrap(AppComponent,[
provide( RequestOptions, { useClass: DefaultRequestOptions } ),
provide(Http, { useFactory:
function(backend, defaultOptions) {
return new Http(backend, defaultOptions); },
deps: [XHRBackend, RequestOptions]}),
]);
I'm guessing it can be done in a component too:
https://angular.io/docs/ts/latest/api/http/Http-class.html
You make it dynamic by adding decisions into the factory function instead of just returning the same object.