英文:
ng.probe(selector) always results in NULL
问题
我知道一个我想要为其创建书签工具的应用程序,我了解到该应用程序是使用Angular 6构建的。我进行了一些谷歌搜索,找到了一种使用这个文章来修改DOM的方法。
第一步是在ng
上调用probe
方法,带有selectors
参数,我尝试了各种选择器,如document.body
,app-root
,$0
等,但结果始终为NULL。
我不确定还缺少什么。
任何帮助将不胜感激,
谢谢。
英文:
So I know of an application for which I wanted to create a bookmarklet, I got to know that application is built using Angular 6. I did a bit of googling and found a way to modify DOM using this article
the first step is to call probe
method on ng
with selectors
, I tried varies selectors such as document.body, app-root, $0, etc, however result is always same as NULL.
I am not sure what's missing here.
Any help would be appreciated,
Thanks,
答案1
得分: 4
ng.probe()
方法只在应用程序未在生产模式下运行时才有效。
英文:
The ng.probe()
method will only work if the application is not running in production mode.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论