简体   繁体   English

如何在Chrome扩展程序中添加角度脚本?

[英]How do you add angular script to chrome extension?

I want to manipulate the text field in a website which is written in angular, through my chrome extension, when I do so from the context of chrome console, I'm able to do edit the text field etc, however, when I do it from the code of my extension, its just not happening and throws the error that angular is not defined, despite the fact that Ive added angular. 我想通过chrome扩展名操作以角度编写的网站中的文本字段,当我从chrome控制台的上下文中进行操作时,我能够编辑文本字段等,但是,当我这样做时从我的扩展代码来看,尽管我已经添加了角度,但实际上并没有发生并且抛出了角度未定义的错误。 PS: I'm also using jQuery as part of my project. PS:我也在项目中使用jQuery。

I actually feel so stupid for asking this. 我真的很愚蠢地问这个问题。 You just need to add the angular's file to the background_script. 您只需要将angular的文件添加到background_script。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Chrome扩展程序中的内容脚本将按钮/图像附加到页面? - How do you append a button/image to a page using a content script in a Chrome Extension? 在 Chrome 扩展中,当 URL 的一部分是动态的时,如何为 URL 添加事件侦听器? - Within a Chrome Extension how do you add an event listener for a URL when part of the URL is dynamic? 如何动态添加或删除Chrome扩展程序,内容脚本,javascript文件? - How do I add or remove Chrome extension, content-script, javascript files dynamically? Chrome扩展程序动态添加脚本 - Chrome Extension Add Script Dynamically 如何从 Chrome 扩展程序编辑页面? - How do you edit a page from a Chrome Extension? 添加 Chrome 扩展时如何安装和访问数据库? - How Do You Install and Access Database When a Chrome Extension is Added? 您如何使用 chrome 扩展检测 url 的变化? - How do you detect changes in url with a chrome extension? 如何在Google Chrome扩展程序中使用Facebook Graph API? - How do you use the Facebook Graph API in a Google Chrome Extension? 你如何随机启动chrome扩展? - How do you make chrome extension randomly start? 你如何重写网页 chrome.extension.executeScript 的代码 - How do you rewrite code of a webpage chrome.extension.executeScript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM