Javascript AngularJs和HTML5历史API不工作

Javascript AngularJs和HTML5历史API不工作,javascript,html,angularjs,html5-history,Javascript,Html,Angularjs,Html5 History,我在使用HTML 5历史API时遇到问题: Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 8; oldVal: 7"],["fn: $locationWatch; newVal: 9; oldVal: 8"],["fn: $locationWatch;

我在使用HTML 5历史API时遇到问题:

    Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 8; oldVal: 7"],["fn: $locationWatch; newVal: 9; oldVal: 8"],["fn: $locationWatch; newVal: 10; oldVal: 9"],["fn: $locationWatch; newVal: 11; oldVal: 10"],["fn: $locationWatch; newVal: 12; oldVal: 11"]]
然后我寻找解决方案,我发现这是一个已知的问题。我找到的唯一有效的“解决方案”是在setTimeout函数smth中包装历史API。像这样:

setTimeout(function() {
            history.pushState({}, "progress", url);
        },1000);
  var url = $browser.url() + "/progress";
  $browser.url(url,true);
  console.log(window.location.href);
一位用户提到这对他也有好处:

$browser.url( state.url );
history.replaceState({}, state.title, state.url );
但我运气不好$浏览器是Angular的私有API,$location使用它,有趣的是,若我使用smth。像这样:

setTimeout(function() {
            history.pushState({}, "progress", url);
        },1000);
  var url = $browser.url() + "/progress";
  $browser.url(url,true);
  console.log(window.location.href);
我的新url已被记录,但在地址栏中看不到更改,即显示$browser.url()。(在Chorme中,此程序显示一秒钟,然后消失)

这可能是由于我的服务器端路由配置造成的吗?(我正在使用ASP.net MVC)

我的问题是,除了setTimeout之外,还有谁在$browser上有过好运或者找到了这个问题的解决方案吗