refactor: use the ExceptionHandler service

Fixes #533
Closes #672
This commit is contained in:
Pawel Kozlowski
2015-02-16 14:55:00 +01:00
parent a1f4060126
commit 709c3ca6b5
6 changed files with 38 additions and 17 deletions

View File

@ -4,6 +4,7 @@ import {MapWrapper} from 'angular2/src/facade/collection';
import {Parser, Lexer, ChangeDetector, ChangeDetection}
from 'angular2/change_detection';
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
import {
bootstrap, Component, Viewport, Template, ViewContainer, Compiler, onChange
} from 'angular2/angular2';
@ -225,9 +226,15 @@ export function setupReflectorForAngular() {
'annotations': []
});
reflector.registerType(ExceptionHandler, {
"factory": () => new ExceptionHandler(),
"parameters": [],
"annotations": []
});
reflector.registerType(LifeCycle, {
"factory": (cd) => new LifeCycle(cd),
"parameters": [[ChangeDetector]],
"factory": (exHandler, cd) => new LifeCycle(exHandler, cd),
"parameters": [[ExceptionHandler, ChangeDetector]],
"annotations": []
});