AngularJS禁用dev的机器部分缓存 [英] AngularJS disable partial caching on dev machine
问题描述
我有问题,在AngularJS缓存谐音。
I have problem with caching partials in AngularJS.
在我的HTML页面我有:
In my HTML page I have:
<body>
<div ng-view></div>
<body>
在我的谐音被加载。
where my partials are loaded.
当我更改HTML code在我的部分,浏览器仍然加载旧数据。
When I change HTML code in my partial, browser still load old data.
有没有什么解决方法吗?
Is there any workaround?
推荐答案
有关发展,您还可以禁用浏览器缓存 - 在Chrome开发工具右下角点击齿轮和刻度选项
For Development you can also deactivate the browser cache - In Chrome Dev Tools on the bottom right click on the gear and tick the option
禁用缓存(而DevTools是打开的)
Disable cache (while DevTools is open)
更新:在Firefox没有在调试器中相同的选项 - >设置 - >高级部分(检查33版)
Update: In Firefox there is the same option in Debugger -> Settings -> Advanced Section (checked for Version 33)
更新2:虽然此选项出现在Firefox中的一些报告,这是行不通的。我建议使用Firebug以下hadaytullah答案。
Update 2: Although this option appears in Firefox some report it doesn't work. I suggest using firebug and following hadaytullah answer.
这篇关于AngularJS禁用dev的机器部分缓存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!