AngularJS - Edit Scope Function from Dev Tools

会有一股神秘感。 提交于 2020-01-06 14:48:38

问题


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?


回答1:


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

Add your new code...

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.



来源:https://stackoverflow.com/questions/52434479/angularjs-edit-scope-function-from-dev-tools

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!