A recent change to the software I am working on left me with the following error:
"exception: Error: [$injector:unpr] Unknown provider: tableNavigationProvider <- tableNavigation <- ajSearchSelectDirective http://errors.angularjs.org/1.4.7/$injector/unpr?p0=tableNavigationProvider%20%3C-%20tableNavigation%20%3C-%20ajSearchSelectDirective"
Now I have looked at multiple stack overflow boards but none of them is any help. How do I find the problem with this error?
Sites that I already looked at:
- https://coderwall.com/p/eeqo7q/debugging-unknown-provider-error-in-angular
- https://docs.angularjs.org/error/$injector/unpr
- angular js unknown provider
After looking at all these and properly testing (to recreate this error), this is what you need to know:
- The item in question is a component that calls up a modal so that you can search a buyer/businessPartner
- On the new implementation is calls the modal but not on any of the older implementations of the same code.
This is what the start of the directive looks like:
(function () { var app = angular.module('ngiBusinessPartner'); app.directive('ajSearchSelect', [ '$timeout', 'uiStateMachine', 'formHelper', 'spinnerService', 'tableNavigation', ajSearchSelect]); function ajSearchSelect( $timeout, uiStateMachine, formHelper, spinnerService, tableNavigation) { //other code goes here }; })();
This is what the start of the service n question looks like:
(function () { 'use strict'; var app = angular.module('tableNavigation', []); app.service('tableNavigation', [ '$document', '$timeout', tableNavigation ]); function tableNavigation($document, $timeout) { //other code goes here }; })();
Please help me find the problem