Angular2 plnkr error

喜欢而已 提交于 2019-12-02 04:09:10

This is because angular2 uses Map, which is part of the es6 draft. Since this is not yet implemented in every browser you'll need to polyfill it and that's what es6-shim is for (see compatibility table). I'm a little bit surprised that that chrome version doesn't still support it, but to be honest I don't know in what version they did add support for Maps. By using Chrome you should be good by just updating it to the latest version (48.0.2564.109 m at the moment I write this answer).

If you're using older browsers (even not that old), like IE, safari, Android browsers, etc, that doesn't support Maps you'll have to polyfill it.

See the quickstart guide under Add the index.html and see the polyfills required to make it work in other browsers.

Reference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!