Module '“angular2/angular2”' has no exported member 'ExceptionHandler'

后端 未结 2 743
难免孤独
难免孤独 2020-12-22 01:06

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

相关标签:
2条回答
  • 2020-12-22 01:24

    I think it's bug. ExceptionHandler must be exported here, but it's not.

    For now for experimenting you can import ExceptionHandler like:

    import { ExceptionHandler } from 'angular2/src/core/facade/exceptions';
    

    Check out this plunker

    0 讨论(0)
  • 2020-12-22 01:24

    Here's a new plunker (modified @alexpods version) that works in beta 11. http://plnkr.co/edit/7VEjaohuse2sLneuCIVC?p=preview

    Basic differences:

    • use of provide instead of bind
    • other System JS paths for import
    0 讨论(0)
提交回复
热议问题