在我的有角度的应用程序中,我正在尝试导入外部库public class CustomExceptionHandlerAttribute : HandleErrorAttribute
{
public override void OnException(ExceptionContext filterContext)
{
if (filterContext.Exception is ArgumentNullException)
//breakpoint here work as expected
filterContext.Result = new RedirectToRouteResult(
new RouteValueDictionary(new { controller = "Home", action = "About" })
);
else
base.OnException(filterContext);
}
}
。我添加了以下代码
angular.json
Presto.js
example.component.ts
"scripts": [
"./src/assets/presto/Presto.js"
]
当它到达调试器时,我可以看到其中的方法import * as Presto from '../../assets/presto/Presto';
ngOnInit() {
debugger;
Presto.layout();
}
,但是当它释放调试点时,会抛出以下错误
layout()
有人对此有任何想法吗。