Open Closed

Renaming of Proxy Service #899


0
anelengqandu created

Hi tried to rename my service from 'abp.services.app.employee' to 'abp.services.app.employeesServices' since its returning a list but now I get an error below;

Unknown provider: abp.services.app.employeeServiceProvider <- abp.services.app.employeeService <- app.views.employees.index

What might be the problem?Or is there a place to where am suppose to remove the original service?

Working Sample code

angular.module('app').controller('app.views.employees.index', [
                 '$scope', '$state', '$uibModal', '$location', '$resource', '$q', '$compile', 'abp.services.app.employee', 'DTOptionsBuilder', 'DTColumnBuilder',
        function ($scope, $state, $modal, $location, $resource, $q, $compile, employeeService, DTOptionsBuilder, DTColumnBuilder) {
            var vm = this;

            vm.employees = [];
          

            function getEmployees() {
                var deferred = $q.defer();

                employeeService.getEmployees({}).success(function (result) {
                    angular.copy(result.items, vm.employees);

                    deferred.resolve(result.items);
                });

                return deferred.promise;
            }
//...

1 Answer(s)
  • 0
    hikalkan created

    There is a problem on your naming:

    In your error:

    Unknown provider: abp.services.app.employeeServiceProvider <- abp.services.app.employeeService <- app.views.employees.index

    But in your explanation, it's abp.services.app.employeesServices.

    Is it employeesServices or employeeService?