I used my service in other places injected automaticaly by angular 2. I want to use the same service in ExceptionHandler. But service doesn't post data to server. I went through debuger and my service invokes.
class MyExceptionHandler extends ExceptionHandler {
rbJSLogger: RBLoggerService;
constructor() {
super(null,null);
var injector = ReflectiveInjector.resolveAndCreate([
RBLoggerService,
JSONP_PROVIDERS,
Http,
ConnectionBackend,
HTTP_PROVIDERS
]);
this.rbJSLogger = injector.get(RBLoggerService);
}
call(error, stackTrace = null, reason = null){
// console.error(stackTrace);
this.rbJSLogger.searchBy("asd");
}
}