我正在使用 Ionic v1 并在 Chrome(ionic 服务)和 View App(ionic 上传)中进行测试。
我将此脚本包含在我的index.html中
<script src="https://s7.addthis.com/js/300/addthis_widget.js#pubid=foo&async=1"></script>
并添加了https://github.com/thisissoon/angular-addthis https://github.com/thisissoon/angular-addthis指示。
<sn-addthis-toolbox class="addthis_custom_sharing"
data-share="{
title: thing.title,
url: 'https://myurl/' + thing.id,
description: 'Check out my thing.'
}">
<a href class="addthis_button_email"></a>
<a href class="addthis_button_facebook"></a>
<a href class="addthis_button_twitter"></a>
<a href class="addthis_button_google_plusone_share"></a>
</sn-addthis-toolbox>
在 Chrome 或 Firefox 中查看我的 ionic 应用程序时,一切看起来都很棒。当我推送到 Ionic 视图时,我的 addthis 按钮丢失了。在 Chrome 开发工具中,任何响应式视图或设备都看起来很棒。
任何方向都会有帮助。我如何在 Ionic 视图中看到错误消息?
为什么 addthis.com js 小部件无法在移动设备上运行?
TIA.
编辑:我添加了 https,这让事情更进一步。 (感谢亚当波特)
现在看到无法加载 file://m.addthisedge.com/live/boost/foo/_ate.track.config_resp 资源:NET ERR_FILE_NOT_FOUND
and
未捕获的类型错误:无法读取 null 的属性“split”
在 r (https://s7.addthis.com/js/300/addthis_widget.js:2:44431 https://s7.addthis.com/js/300/addthis_widget.js:2:44431)
在电子出口(https://s7.addthis.com/js/300/addthis_widget.js:2:211271 https://s7.addthis.com/js/300/addthis_widget.js:2:211271)
在https://s7.addthis.com/js/300/addthis_widget.js:2:224158 https://s7.addthis.com/js/300/addthis_widget.js:2:224158
at https://s7.addthis.com/js/300/addthis_widget.js:2:361724 https://s7.addthis.com/js/300/addthis_widget.js:2:361724在 o (https://s7.addthis.com/js/300/addthis_widget.js:2:223353 https://s7.addthis.com/js/300/addthis_widget.js:2:223353)
在https://s7.addthis.com/js/300/addthis_widget.js:2:215504 https://s7.addthis.com/js/300/addthis_widget.js:2:215504在 HTMLDocument.onReady (https://s7.addthis.com/js/300/addthis_widget.js:2:214257 https://s7.addthis.com/js/300/addthis_widget.js:2:214257)
在 addthis_widget.js 第 2 行
最终编辑和解决方案:我学会解决这个问题的最好方法是通过 USB 连接我的 Nexus 6p,启用 USB 调试,然后https://developers.google.com/web/tools/chrome-devtools/remote-debugging/ https://developers.google.com/web/tools/chrome-devtools/remote-debugging/