我有一个将 Angular 错误记录到数据库的应用程序,并且我偶尔会看到此错误的日志
Error: [$compile:tpload] http://errors.angularjs.org/1.5.8/$compile/tpload?p0=app%2Fmyroute%2Fpmyroute.html&p1=-1&p2=
当访问该网站时,路线和模板加载得很好,但这些错误正在发生,我想知道为什么。这是我的 config.route.js 中的路线
{
url: '/',
config: {
title: 'My Route',
templateUrl: 'app/myroute/myroute.html',
settings: {
nav: 9,
content: '<span class="mg-icon"><i class="fa fa-search"></i></span><h5 class="mg-nav-text">My Route</h5>'
}
}
}
该网站托管在 Azure 中,但如果重要的话,它是 AlwaysOn 的。 偶尔发生此错误是否有特殊原因?
最佳答案
Error: [$compile:tpload] http://errors.angularjs.org/1.5.8/$compile/tpload?p0=app%2Fmyroute%2Fpmyroute.html&p1=-1&p2=
这是一个常见错误。请检查当时模板的URL为何未解析。我建议您打开失败请求跟踪以获取失败请求的详细错误消息。
更新于 2017 年 5 月 2 日
What am I looking for in the file? I see the request that errored but it gives no insight into what went wrong.
启用详细错误消息和失败请求跟踪后,您将看到 LogFiles/文件夹下有一个名为 W3SVC1505031315 的文件夹。您可以将其下载到本地并使用 IE 打开日志 xml。您可以通过点击[请求详情]选项卡查看请求详细信息。
关于angularjs - 偶尔 $compile :tpload errors,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43521625/