Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Application Service method error #3201


User avatar
0
doubledp created

I have tried to determine what I am doing wrong, but can't seem to find the difference between my controller/app service combo and the dashboard example.

I am getting the following JavaScript error when calling the method inside my service from the angular controller:

TypeError: Object doesn't support property or method 'success'

When I use the following, I get no JavaScript error:

function Test() {
     appService.getTest()
        .then(function(result) {
            var test = result;
         });
}

But when I use the following code, I get the JavaScript error:

function Test() {
     appService.getTest()
        .success(function(result) {
            var test = result;
         });
}

What could be the reason for this?


2 Answer(s)
  • User Avatar
    0
    doubledp created

    Nevermind, it appears that the implementation has changed on the new version of ASP.NET Zero versus the older version of it.

    You use to be able to call .success(), but will call .then() from now on.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks for the feedback @DoubleDP, yes success is deprecatead for angular.