How to read an unknown provider error in AngularJS?

Viewed 258

Currently there is an error in console as below,

Error: [$injector:unpr] Unknown provider: userProvider <- user <- MainCtrl

My understanding per AngularJS docs, https://docs.angularjs.org/error/$injector/unpr, is this typically relates to dependency issues.

I'm not concerned about solving this specific error (already solved, or at least made it disappear by removing ng-controller directive from view), but I want to understand the syntax of the error provided by angular.

I see 3 basic parts (in above error) with arrows between them.

  1. userProvider
  2. user
  3. MainCtrl

How might this direction be used in troubleshooting a future issue?

1 Answers
Related