简体   繁体   中英

Angular 2 error Map is not defined

I edited my question because it was not clear enough (I think)

I have a simple app in angular2 and I try to run it on Xbox (yes it's possible with the development kit and Visual Studio). I know it works with an angular 1.5 app because I already succeed. So, this is my stack trace when the code run (sorry my VS is partially in french) :

在此处输入图片说明

This is my index.html :

在此处输入图片说明

And this is my systemjs.config.js :

在此处输入图片说明

Because I need to push my app on Xbox I had all js files I need in my visual jsproject BUT I think I forgot one but I don't know which one so... If you have an idea. Thank you !! :)

My best guess is that you need to load the ES6 shim in your index.html file(as explained here ).

<script src="../node_modules/core-js/client/shim.min.js"></script>

Place it before the zone.js script line(or even base.js).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM