Skip to content

Instantly share code, notes, and snippets.

@cmrichards
Last active December 29, 2015 06:19
Show Gist options
  • Save cmrichards/7627744 to your computer and use it in GitHub Desktop.
Save cmrichards/7627744 to your computer and use it in GitHub Desktop.
Gives this error "Error: [$injector:unpr] http://errors.angularjs.org/1.2.2/$injector/unpr?p0=userServiceProvider%20%3C-%20userService"
var UserSearchController = function(userService, $scope, $http) {
...
}
var userService = function($http) {
..
}
var app = angular.module("testApplication", [])
.service("userService", userService)
.controller("UserSearchController", ["userService", UserSearchController]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment