Angular 我应该为ExceptionHandler使用什么依赖项
我正在尝试在引导函数之前添加ExceptionHandler。 ExceptionHandler无法找到依赖项。我想补充一下Angular 我应该为ExceptionHandler使用什么依赖项,angular,webpack,Angular,Webpack,我正在尝试在引导函数之前添加ExceptionHandler。 ExceptionHandler无法找到依赖项。我想补充一下 import {ExceptionHandler} from 'angular2/src/facade/exception_handler'; import {ExceptionHandler} from '@angular/src/facade/exception_handler'; 看起来我需要向我的package.json添加一个适当的依赖项。 我认为如上所述添加
import {ExceptionHandler} from 'angular2/src/facade/exception_handler';
import {ExceptionHandler} from '@angular/src/facade/exception_handler';
看起来我需要向我的package.json添加一个适当的依赖项。
我认为如上所述添加导入不是一个好方法。
我认为应该这样加上
import {ExceptionHandler} from "@angular/facade";
但是我不知道具体是怎么做的。您可以使用
角度/核心
异常处理程序
import {ExceptionHandler} from 'angular2/core';
对。我很抱歉。我的想法是Webstorm通常会自动添加导入。谢谢:)