My code is generating the error
TypeError: t(...).success is not a function
. I have tried searching for a solution but haven't been able to figure out why this error is happening in my specific case.
Here is a snippet of my JS code. Can anyone point out what I might be doing wrong that's causing this error?
var app = angular.module('PriceListEditModule', ['ngRoute']);
app.controller('PriceListEditController', ["$scope", "$q", function ($scope, $q) {
GetBrands();
function GetBrands() {
$http({
method: 'Get',
url: '/GetBrands'
}).success(function (data, status, headers, config) {
$scope.brands = data;
}).error(function (data, status, headers, config) {
$scope.message = 'Unexpected Error';
});
}
}]);
The error message I am receiving looks like this
jquery:1 TypeError: t(...).success is not a function
at i (jquery:1)
at new <anonymous> (jquery:1)
at Object.invoke (jquery:1)
at v.instance (jquery:1)
at pt (jquery:1)
at p (jquery:1)
at p (jquery:1)
at jquery:1
at jquery:1
at p.$eval (jquery:1)