angular - 如何在角度构建后在 index.html 的脚本标签中注入延迟
问题描述
我想推迟在 Angular 应用程序中加载我的 vendor.js 包。我应该寻找哪种方法,因为没有直接的方法可以以角度延迟加载包。这是我的 src index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>DeferLoding</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
</head>
<body class="mat-typography">
<app-root></app-root>
</body>
</html>
解决方案
推荐阅读
- python-3.x - 我使用 imageai 包进行自定义产品检测时出错
- java - 在Java中你如何调试由JPackage创建的exe
- vb.net - 使用带有 VB.NET Windows 窗体的新 Dymo Connect SDK 打印自定义标签
- ios - SwiftUI | 使用 onDrag 和 onDrop 在一个 LazyGrid 中重新排序项目?
- php - 让除了管理员之外的所有人都消失
- python - 如何在没有 WINWORD 的情况下解析 .doc 文档?
- nuxt.js - 生产环境中暴露的 Nuxt 环境变量
- algorithm - 为什么我们测量时间复杂度而不是步长复杂度?
- postgresql - EC2 ubuntu 机器无法连接到 PostgreSQL RDS
- python - 如何从 Django Queryset 中获取前 4 个对象