javascript - Angular 应用无法在 Firefox 和 Safari 上运行
问题描述
构建后我的 Angular 应用程序无法在 Firefox 和 Safari 中运行,但在 Chrome 中运行良好
我尝试在 Polyfills 中加载 web 动画并更改了不同的 polyfills 版本
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
//import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
import 'web-animations-js'; // Run `npm install --save web-animations-js`.
在 Firefox 中,请求转到 301(临时重定向)
解决方案
推荐阅读
- go - 使用 Go 通过 GCP 发布/订阅设置 Gmail 推送通知
- python - OpenCV 搜索 сontours
- c++ - C ++:如何从k = 2 ^ a * b中找到a和b?
- javascript - 未定义属性上的 javascript eval 表达式
- python - AJAX 无法在 Django 中定义键的方法
- templates - PhpStorm 使用变量内的变量创建实时模板
- python - 根据另一个数组中 argmax 的索引从数组中选择值
- c# - Visual Studio 中的数据库问题(c# 和 SQL Server)
- python-3.x - 如何使用 Python Docx 将图像从一个文档中的表格复制到另一个文档
- r - “选择了未知的列”