Javascript Angular2-没有ExceptionHandler的提供程序

Javascript Angular2-没有ExceptionHandler的提供程序,javascript,ecmascript-6,angular,angular2-services,Javascript,Ecmascript 6,Angular,Angular2 Services,我正在尝试将angular2集成到我的PHP应用程序中。 以下是我执行的步骤 包括必要的JS: 。/node_modules/angular2/bundles/angular2-polyfills.js ../node_modules/systemjs/dist/system.src.js ../node_modules/typescript/lib/typescript.js ../node_modules/rxjs/bundles/Rx.js ../node_modules/angular2

我正在尝试将angular2集成到我的PHP应用程序中。 以下是我执行的步骤

  • 包括必要的JS:
  • 。/node_modules/angular2/bundles/angular2-polyfills.js
    ../node_modules/systemjs/dist/system.src.js
    ../node_modules/typescript/lib/typescript.js
    ../node_modules/rxjs/bundles/Rx.js
    ../node_modules/angular2/bundles/angular2.dev.js

  • 已在Typescript中创建angular2组件:
  • 从'angular2/core'导入{Component};
    @组成部分({
    选择器:“你好,世界”,
    模板:“我的第一个Angular 2应用程序”
    })
    导出类AppComponent{}

  • 配置:
  • 
    System.config({
    transpiler:'typescript',
    typescriptOptions:{emitDecoratorMetadata:true}
    });
    

  • 引导:
  • 
    System.import('angular2/平台/浏览器')。然后(函数(ng){
    System.import('js/app.ts')。然后(函数(src){
    引导(src.AppComponent);
    }).then(null,console.error.bind(console));
    });
    

    输出:

    编辑:


    似乎与prototype.js和angular 2存在冲突。请参阅pluker:

    我多次遇到此错误。据此:

    您可能缺少几个脚本:

    <script src="node_modules/es6-shim/es6-shim.min.js"></script>
    <script src="node_modules/systemjs/dist/system-polyfills.js"></script>
    
    
    
    如果使用Internet Explorer,还应记住包括:

    <script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
    
    
    
    像IE这样的浏览器都有一个单独的垫片文件吗?@PardeepJain我不知道,但你可能可以查看该文件夹中的文件,看看里面有什么:)@PardeepJain:没有。在IE11中使用此功能的原因可以从文件内容中找到。例如,
    function.name
    在所有其他主流浏览器上都可以使用,但在IE中不能使用。更多详细信息。@roopehakulin我实际上认为这是为了>IE8,而不仅仅是IE11。