Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
guy below i given my code sample it's returning (Uncaught ReferenceError: updateData is not defined) error . could you help me to find what i am missing , pls help me to make it workable . here you can find code , my service returning JSONP response .


var student = angular.module("studentModule", []);

student.controller("StudentCtrl", ["$scope", "$http", function($scope, $http) {
$http({
method: 'jsonp',
url: 'http://abelski.com/courses/ajax/data.json?callback=updateData'

})
.success(function (data, status, headers, config) {
$scope.students = data;

})

.error(function (data, status, headers, config) {

});
}]);
Posted
Comments
Kumarbs 6-May-15 1:07am    
Make sure the returning data from the service is in JSON format. Currently it is not in a JSON manner.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900