gpt4 book ai didi

javascript - Angular v1.2.25错误 "fnPtr is not a function"

转载 作者:行者123 更新时间:2023-11-28 00:00:51 24 4
gpt4 key购买 nike

我收到此错误,没有特定的模式。该页面曾经可以正常工作,但现在这个错误使我的一切都变得困惑。有没有好的方法来调试或追踪问题?

Error: fnPtr is not a function
Parser.prototype.functionCall/<@http://localhost:15987/Scripts/angular/angular.js:10847:15
OPERATORS["&&"]@http://localhost:15987/Scripts/angular/angular.js:10198:45
Parser.prototype.binaryFn/<@http://localhost:15987/Scripts/angular/angular.js:10600:14
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:15987/Scripts/angular/angular.js:12532:34
initialize/$scope.loadReasonCodes/<@http://localhost:15987/scripts/voController.js:286:13
jQuery.Callbacks/fire@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:3062:10
jQuery.Callbacks/self.fireWith@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:3174:7
done@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:8249:5
.send/callback@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:8792:8
@debugger eval code:1:1
consoleLog/<@http://localhost:15987/Scripts/angular/angular.js:10071:18
$ExceptionHandlerProvider/this.$get</<@http://localhost:15987/Scripts/angular/angular.js:7364:7
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:15987/Scripts/angular/angular.js:12559:19
getPoLineDetails/<@http://localhost:15987/scripts/voController.js:347:9
jQuery.Callbacks/fire@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:3062:10
jQuery.Callbacks/self.fireWith@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:3174:7
done@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:8249:5
.send/callback@http://localhost:15987/Scripts/jquery/jquery-1.10.2.js:8792:8
consoleLog/<()angular.js (line 10071)
$ExceptionHandlerProvider/this.$get</<()angular.js (line 7364)
$RootScopeProvider/this.$get</Scope.prototype.$digest()angular.js (line 12559)
initialize/$scope.loadReasonCodes/<()voController.js (line 286)
jQuery.Callbacks/fire()jquery-1.10.2.js (line 3062)
jQuery.Callbacks/self.fireWith()jquery-1.10.2.js (line 3174)
done()jquery-1.10.2.js (line 8249)
.send/callback()jquery-1.10.2.js (line 8792)
consoleLog/<()angular.js (line 10071)
$ExceptionHandlerProvider/this.$get</<()angular.js (line 7364)
$RootScopeProvider/this.$get</Scope.prototype.$digest()angular.js (line 12559)
getPoLineDetails/<()voController.js (line 347)
jQuery.Callbacks/fire()jquery-1.10.2.js (line 3062)
jQuery.Callbacks/self.fireWith()jquery-1.10.2.js (line 3174)
done()jquery-1.10.2.js (line 8249)
.send/callback()

错误可能出现在本节中

function getPoLineDetails($scope) {
$.ajax({
url: api + 'pos',
data: { po: $scope.vo.PO, lines: $scope.vo.PoLineNumbers.join(','), detailId: $scope.vo.Id },
success: function (data) {
$scope.vo.PoLines = data;
if ($scope.vo.Id != undefined && $scope.vo.Id != null && $scope.vo.Id != -1) {
$.each($scope.vo.CostBreakdown, function (index, item) {
//no content here yet
});
}
$scope.$digest();
}
});
}

最佳答案

当我对变量和函数使用相同的名称时,我遇到了这种错误。这是你的情况吗?

像这样:

    $scope.search = 'search';
$scope.search = function(){}

关于javascript - Angular v1.2.25错误 "fnPtr is not a function",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31828828/

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