Pace:在 angularjs 中跟踪 $http 请求?

Pace: Track $http requests in angularjs?

来自github的问题:

https://github.com/HubSpot/pace/issues/154

我正在尝试加快使用我的 angularjs 应用程序的速度。页面加载一切正常,但是当我进行 $http 调用时,速度不显示进度。有什么想法吗?

我试过使用这个库,但它不像我想要的那样可配置,但是它可以与 $http 一起使用。 https://github.com/chieffancypants/angular-loading-bar

在 index.html

中包含 pace.js 之前,尝试 加载以下选项
window.paceOptions = {
    document: true, // disabled
    eventLag: true,
    restartOnPushState: true,
    restartOnRequestAfter: true,
    ajax: {
        trackMethods: [ 'POST','GET']
    }
};