I have been working on an Ionic v2 App and trying to incorporate the ExceptionHandler from angular2.
With Ionic2 not requiring the developer to explicitly call bootstrap
, it appears challenging to implement this feature at the moment. Has anyone successfully implemented a custom ExceptionHandler in Ionic v2?
Although I made an attempt, it doesn't seem to work as expected and causes the app to fail loading without displaying any exceptions on the page.
import {ExceptionHandler,provide} from 'angular2/core';
import {bootstrap} from 'angular2/bootstrap';
import {AppExceptionHandler} from './services/exception-service';
...
bootstrap(MyApp,provide(ExceptionHandler, {useClass: AppExceptionHandler }));