Struggling with the unknown provider issue, I've searched through other threads and tried their solutions to no avail. My goal is to inject 'MockSvc' service into a controller without encountering any errors. Any advice would be greatly appreciated.
app.js:
(function(){
'use strict';
console.log('app.js initialized....');
var app = angular.module('app', ['ngRoute']);
})();
service:
(function(){
'use strict';
var app = angular.module('app');
app.factory('MockSvc', MockSvc);
console.log('MockSvc service initialized...');
function MockSvc(){
var service = {
};
initialize();
return service;
function initialize() {
console.log('MockSvc function initialization...');
};
}
})();
controller:
(function(){
'use strict';
var app = angular.module('app', ['ngCookies']);
app.controller('PONumSearch2', PONumSearch);
PONumSearch.$inject = ['$scope', '$http', '$cookies', '$cookieStore', '$location', '$window','MockSvc'];
function PONumSearch($scope, $http, $cookies, $cookieStore, $location, $window,MockSvc){
//controller logic goes here....
})();