gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 08:15:41 25 4
gpt4 key购买 nike

来自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']
}
};

关于Pace:在 angularjs 中跟踪 $http 请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42236286/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com