未捕获的类型错误:pre、template、textarea、script、style 不可迭代 [英] Uncaught TypeError: pre,template,textarea,script,style is not iterable

查看:22
本文介绍了未捕获的类型错误:pre、template、textarea、script、style 不可迭代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的cordova 应用程序尝试在我的智能手机上运行时遇到了这个问题.

I am encountering this problem while my cordova app tries to run on my smartphone.

我正在使用 angular cli.我搜索了指定的错误,发现是 github 上的一个封闭问题,其中解决方案(对许多人都有效)是将 .angular-cli.json 中列出的资产放在一个数组中.关键是我的资产已经在一个数组中.我试图更进一步,但这个问题是我发现的唯一问题.

I'm using angular cli. I searched for the error specified and what I found was a closed issue on github where the solution (which worked for many) is to put the assets listed in .angular-cli.json in an array. The point is that my assets are already in an array. I've tried to look further but that issue is the only thing I've found.

然而,编译 webpacks 是成功的,而不是错误的.浏览器中出现的唯一错误是标题错误.

However, compiling webpacks is successful and not by mistakes. The only mistake appears in the browser and is that of the title.

我不知道该怎么办.

推荐答案

这可能是由于缺乏 ES6 支持造成的.您可以尝试在 Polyfill.ts 中添加/取消注释以下内容

This can be caused by lack of ES6 support. Can you try adding/uncommenting following in your Polyfill.ts

import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';

这篇关于未捕获的类型错误:pre、template、textarea、script、style 不可迭代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆