{"success":1,"onion":[{"id":"12273","titolo":"How to Integrate Opbeat Into an Angular 2 App","ricetta":"[Offline \/ 2019-10-30] How to Integrate Opbeat Into an Angular 2 App\nSimon Ramsay\n|\nabout\nHow to Integrate Opbeat Into an Angular 2 App\nSep 5, 2016 \u2022 Simon\nOpbeat is a paid service for select performance monitoring and reporting runtime errors in Javascript applications. While they do support an Angular 1 integration, Angular 2 will not be supported until its API stabilizes (ref).\nUntil that magical day occurs, a hard coded solution is available (as shown below).\nimport {\nExceptionHandler,\nInjectable\n} from '@angular\/core';\n\/\/ cant import the source\ndirectly using webpack, so we have to\n\/\/ include the built source file on the page to expose _opbeat\n\/\/ on the window\ndeclare let _opbeat;\n\/\/ Firefox tracking protection will block the opbeat script from loading,\n\/\/ so sub it out\nif (!(window)._opbeat) {\n(window)._opbeat = function noop() { };\n}\n\/**\n* maintain default error logging BUT also send errors off to opbeat\n*\/\n@Injectable()\nexport class OpBeatErrorHandler extends ExceptionHandler {\nprivate s...","url":"http:\/\/eqac56hh4ppxzy27.onion\/2016\/09\/05\/opbeat-angular-2-integration.html"}]}