我的Angular应用中出现了一些奇怪的问题。它只是无限加载而已,当我打开开发工具时,它将继续并完成加载应用程序。似乎正在等待我打开开发工具继续进行。如果我打开了开发工具,然后尝试刷新应用程序,那么它仍然停留在加载过程中,直到我关闭并再次打开开发工具。绝对没有控制台错误/警告等。一旦完成加载,它就会按应有的方式运行。感觉有些东西阻止了应用程序在某处的加载,但无法找出位置。
这是在我从index.html中删除了一些CDN引用并将它们添加到angular.json之后发生的。请参阅摘要。
以下是我从index.html中删除的代码
<!-- Import polyfill for MSAL IE integration -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/bluebird/3.3.4/bluebird.min.js"
class="pre"></script>
<!-- Material Icons -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<!-- Font Awesome -->
<link rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.8.1/css/all.css"
integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf"
crossorigin="anonymous">
这是我添加到angular.json的代码
"scripts": [
"node_modules/hammerjs/hammer.min.js","node_modules/bluebird/js/browser/bluebird.min.js"
],"styles": [
"src/styles/styles.scss","node_modules/material-icons/iconfont/material-icons.css","node_modules/font-awesome/css/font-awesome.css"
]
角度版本:8.1.0