angularjs - 无法读取未定义的属性“getNotificationPermission_”
问题描述
我在我的项目中使用 AngularJS 和 Gulp。在 localhost 中工作正常,但是在生产中构建它时,它不起作用并显示下面的错误。
Unable to get permission to notify. TypeError: Cannot read property 'getNotificationPermission_' of undefined
at vendor.js:100634
at vendor.js:100634
at Object.next (vendor.js:100634)
at vendor.js:100634
at new Promise (<anonymous>)
at n (vendor.js:100634)
at a.requestPermission (vendor.js:100634)
at vendor.js:100666
解决方案
我只是将firebase设置为最后一个版本,问题就消失了。
推荐阅读
- java - groovysh 给出调用目标异常
- javascript - 将数据从函数返回到 ajax javascript
- python - 客户端未从服务器 python 接收数据
- linux - cpu时间在虚拟机中跳跃很多
- highcharts - Highstock 设置 XAxis 极端没有数据
- spring - 初始化 List 的最佳实践?自动装配列表或构造函数初始化?
- amazon-web-services - 尽管输入了准确的话语,AWS Lex 仍匹配错误的意图
- javascript - ScrollIntoView() 不起作用 - vanilla JS,为什么?
- ios - 如何使用导航栏过渡到视图控制器?
- android - 使用 --env.aot 标志时未构建 Nativescript 应用程序