Angular - TypeError: XX is not a function

前端 未结 1 1861
执念已碎
执念已碎 2020-12-16 01:46

Maybe I\'m missing some kind of property, but I\'m follow this project and I\'m getting this error in my controller.

TypeError: loginService.signin is not a          


        
1条回答
  •  伪装坚强ぢ
    2020-12-16 02:27

    You are messing with Dependency injection array, that should follow correct order of dependency when you are using it in a function.

    Code

    angular.module('appcontrollers', []).controller('LoginController', ['$rootScope', '$scope', '$http', '$location', '$localStorage', 'loginService',  
            function ($rootScope, $scope, $http, $location, $localStorage, loginService) {
    

    0 讨论(0)
提交回复
热议问题