简体   繁体   English

如何从浏览器控制台禁用angular.reloadWithDebugInfo()?

[英]How to disable angular.reloadWithDebugInfo() from browser console?

I want app scope variables should not be accessible from the browser console. 我希望不应从浏览器控制台访问应用范围变量。 I used $compileProvider.debugInfoEnabled(false); 我用$compileProvider.debugInfoEnabled(false);

However that can be manipulated using reloadWithDebugInfo() . 但是,可以使用reloadWithDebugInfo()进行操作。

How do I make app scope variables should not be accessible during production? 如何使应用范围变量在生产期间不可访问?

I know its would be hacky solution 我知道这将是很棘手的解决方案

You could make angular.reloadWithDebugInfo to override with blank function. 您可以使angular.reloadWithDebugInfo用空白函数覆盖。

angular.reloadWithDebugInfo = angular.noop

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM