模块'" angular2 / angular2"'没有出口成员“的ExceptionHandler” [英] Module '"angular2/angular2"' has no exported member 'ExceptionHandler'

查看:142
本文介绍了模块'" angular2 / angular2"'没有出口成员“的ExceptionHandler”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要定制默认的异常处理程序的行为,这样做,我想重写的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';

查看这plunker

这篇关于模块'" angular2 / angular2"'没有出口成员“的ExceptionHandler”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆