I have the below code implementation for service call but am getting the following error : "angular.min.js:102 Error: [$injector:unpr]"
please advise me on the below error.thanks in advance
    var app1 = angular.module('homeapp', []);
app1.service('APIService', function ($http) {
    this.getSkill = function (userid) {
        //return $http.get("api/GetSkillRating", )
    return $http({
                url: "api/GetSkillRating",
                method: "GET",
                params: { userid: userid }
            });
    }
});  
app1.controller("HomeController", ['$scope', 'APIService', function ($scope, APIService) {
    $scope.skillrating =[];
    $scope.getAll = function () {
        var servCall = APIService.getSkill(userid);
        servCall.then(function (d) {
            $scope.skillrating = d.data;
        }, function (error) {
                $log.error('Oops! Something went wrong while fetching the data.')
            })
    }  
}])
 
    