Open Closed

Renaming of Proxy Service #899

anelengqandu created

Hi tried to rename my service from '' to '' since its returning a list but now I get an error below;

Unknown provider: <- <- 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', '', '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);


                return deferred.promise;

1 Answer(s)
  • 0
    hikalkan created
    Support Team

    There is a problem on your naming:

    In your error:

    Unknown provider: <- <- app.views.employees.index

    But in your explanation, it's

    Is it employeesServices or employeeService?