Add polyfill code in Angular 2

隐身守侯 提交于 2019-12-05 05:08:53
n00dl3

Note that for your personnal case (using angular 2, core-js is normally included in most starter packs). so you just need to add this to your polyfills.ts:

import "core-js/es7";

However if you are interested in declaring custom polyfills in typescript, you can take a look at this question. You'll just need to require("your-custom-polyfill.js") in polyfills.ts then.

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