When using angularjs
I made sure to register a service in the services directory under modules -> module_name
angular.module('module_name').factory('service_name', [
function() {
// Public API
console.log('hello');
return {
someMethod: function() {
return true;
}
};
}
]);
After encountering this Error: Unknown provider: employeesProvider <- employees, I discovered that removing the ngController resolves the issue. However, I am faced with a dilemma as I need the controller to render specific model data in my view.
If I take out the ngController, I do not receive any data.
How should I proceed?