Open Closed

Problem calling ABP application service in AJAX #557

lauriep created


Sorry for what is probably a beginner question.

I am confident that I have wired up my new app service properly for WebApi as I can call it in Chrome developer tools:

[attachment=2:cz22gv4t]Capture.JPG[/attachment:cz22gv4t] [attachment=1:cz22gv4t]Capture2.JPG[/attachment:cz22gv4t]

However, when I try and call the service in the AngularJS controller I get "h = Object doesn't support property or method 'GetSupplierforCurrentUserAsync'"

In debug mode, I can see that the service is instantiated and the method is available:


Are you able to give me a pointer as to what is going wrong please? Full JS code:

(function () {
    appModule.controller('tenant.views.dashboard.index', [
        '$scope', '', '',
        function ($scope, tenantDashboardService, supplierService) {
            var vm = this;

            $scope.$on('$viewContentLoaded', function () {


            vm.SupplierName = "";

            supplierService.GetSupplierforCurrentUserAsync({}).success(function (result) {
                vm.SupplierName = result.Name;

2 Answer(s)
  • 0
    hikalkan created
    Support Team


    If should be camelCase like 'getSupplierforCurrentUserAsync' instead of 'GetSupplierforCurrentUserAsync'.

    Have a nice day :)

  • 0
    lauriep created

    All good. Many thanks for the quick response.