[英]Pace: Track $http requests in angularjs?
Question from github: 来自github的问题:
https://github.com/HubSpot/pace/issues/154 https://github.com/HubSpot/pace/issues/154
I'm trying to get pace to work with my angularjs app. 我正在尝试加快与我的angularjs应用程序一起工作的速度。 Everything works fine with page loads but when I make a $http call pace doesn't show the progress. 网页加载时一切正常,但是当我进行$ http调用时,进度没有显示。 Any ideas? 有任何想法吗?
I tried using this library but it isn't as configurable as I would like, it does however with with $http. 我尝试使用此库,但它不像我想要的那样可配置,但是使用$ http可以。 https://github.com/chieffancypants/angular-loading-bar https://github.com/chieffancypants/angular-loading-bar
Try loading the following options before including pace.js in your index.html 在index.html中包含speed.js之前,请尝试加载以下选项
window.paceOptions = {
document: true, // disabled
eventLag: true,
restartOnPushState: true,
restartOnRequestAfter: true,
ajax: {
trackMethods: [ 'POST','GET']
}
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.