angular - Angular 6 项目在 Chrome 中运行良好,但在 IE11 中运行良好
问题描述
我的 Angular 6/Visual Studio,.net 框架 4.6.2 应用程序在 Chrome 中显示正常,但在 IE 11 中没有显示。我用谷歌搜索了这个问题,并根据 [ IE 11 使用 Angular 5 的兼容性错误未 注释并按照建议安装了 npm。
也根据:[ Angular 2 / 4 / 5 not working in IE11 added
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
在 src 下的 index.html 和 Home 下的 index.cshtml 中。
当我在 IE 中执行“检查元素”时,我进入控制台:
SCRIPT1010: Expected identifier
File: vendor.js, Line: 174472, Column: 9
vendor.js from lines 174466 - 174474 gives:
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.
Object.defineProperty(exports, "__esModule", { value: true });
174472 - >function* Forward(target) {
yield* target;
}
请指导怎么办?
PS 这是我的 tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
解决方案
推荐阅读
- c# - 给定条件打开另一个表单?C#视觉工作室
- python - 在 Django 的 CRUD 中对 OPTIONS 请求做出什么回答?
- postgresql - partition by - 如何正确使用以获取相关行
- haskell - 在 Haskell 中组合任何类型的绑定
- java - 如何从我的 openapi 招摇中删除“api-resource-controller”
- ms-access - MS Access - 在 DSUM 中使用多个“数字格式”标准
- r - 将 JSON 结构化 url 转换为 R 中的数据
- javascript - 如何在不单击的情况下每 2 秒在新选项卡中打开一个不同的链接
- python - 使用 geckodriver 和 Freebsd 无法在 selenium 中解码 Marionette 的响应
- r - 有没有办法使用 R studio (Rmarkdown) 和 Github (Github pages) 创建双语/多语言网站?