AngularJS-通过开发工具编辑作用域函数 [英] AngularJS - Edit Scope Function from Dev Tools

查看:66
本文介绍了AngularJS-通过开发工具编辑作用域函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对产品进行一些测试,并且尝试编辑控制器的作用域功能之一(通过Chrome开发工具),然后通过已设置为调用该功能的已有按钮来调用此新编辑的功能,或者通过控制台.我遇到了麻烦,因为我的更改没有被提取.我一直在搜索SO几个小时,但是还没有找到有效的答案.在不重新加载页面的情况下刷新特定功能(或者可能是控制器本身)是否有窍门?

I am doing some testing on a product and I am attempting to edit one of my controller's scope functions (from Chrome Dev Tools) and then call this newly edited function either via the already-existing button that's set up to call it or via console. I'm having trouble with this though because my changes are not being picked up. I have been scouring SO for a couple hours but haven't been able to find a working answer yet. Is there a trick to refreshing a specific function (or possibly the controller itself) without reloading the page?

推荐答案

您应该能够从源"面板中更改代码.

You should be able to change the code from the Sources panel.

添加您的新代码...

Add your new code...

,然后按 Command + S (Mac)或 Control + S (所有其他操作系统).如果文件名旁边带有星号,则表示尚未应用您的新代码.

And then press Command+S (Mac) or Control+S (all other OSs) to save. When there's an asterisk next to the file name, it means that your new code hasn't been applied.

这篇关于AngularJS-通过开发工具编辑作用域函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆