问题描述
我要定制默认的异常处理程序的行为,这样做,我想重写的ExceptionHandler类,但我得到下一个错误,当我使用的下一个code
I want to customize the default exception handler behavior and to do that I want to override the ExceptionHandler class, but I get the next error when I use the next code
错误:
模块'angular2 / angular2'没有出口成员的ExceptionHandler。
Error: Module '"angular2/angular2"' has no exported member 'ExceptionHandler'.
code:
进口{}的ExceptionHandler从'angular2 / angular2';
Code: import {ExceptionHandler} from 'angular2/angular2';
这是正确的形式给出?从哪里或者我不得不进口什么?
Is this the correct aproach ? From where or what I have to import ?
推荐答案
我认为这是错误。 的ExceptionHandler
必须出口的,但事实并非如此。
I think it's bug. ExceptionHandler
must be exported here, but it's not.
有关现在尝试,你可以导入的ExceptionHandler
这样的:
For now for experimenting you can import ExceptionHandler
like:
import { ExceptionHandler } from 'angular2/src/core/facade/exceptions';
查看
这篇关于模块'" angular2 / angular2"'没有出口成员“的ExceptionHandler”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!