progressive-web-apps - 使用 Angular PWA 时地图函数语法已更改
问题描述
我在 app.component.ts 文件中写了下面的 map 函数,以便在 angular pwa 中构建
function(doc:any) {
emit(doc.timestamp,doc.news)
}
function(doc:any) {
if(doc.upVote >= 7 ){
emit(doc.upVote,doc.news)
}
如果我使用 pwa 进行构建ng builld --prod
,则编译上述文件并生成名为 main.js 的新文件
在 manifest.js 中,map 函数编译如下,所以我无法执行代码
function(s){(void 0)(s.timestamp,s.news)}
function(o){o.upVote>=7&&(void 0)(o.upVote,o.news)}
解决方案
推荐阅读
- java - 将对象上传到 Amazon S3 时多次超时
- .net - 如何将对根 URL 的调用单独重定向到子路径
- c# - 使用表达式重用 linq 逻辑,当查询同一个实体但一次直接和一次外键连接时
- r - MacOS 上的 spacyr:“错误:未找到 Python 共享库,未加载 Python 绑定”
- windows - windows cmd 引号内的引号
- php - joomla 4 博客类别未正确平衡
- java - 从包含不同字母数字的字符串中删除模式
- elrond - 为什么会出现“存储解码错误:输入太短”错误?
- powershell - 在当前目录中以管理员身份启动 PowerShell
- tensorflow - 多输入模型的 TensorFlow 验证数据错误