I need a help. I use Angularjs 1.6 and I want just simply to inject a service from diff file in a controller. Looks pretty easy, aha) Before I read this: AngularJS: Service in different file. But it didn't work in my case.
My code looks next:
app.js
angular.module('myApp', ['formService', 'formLogic'])
component.js
angular.module('formLogic',[])
.component('formLogic',{
templateUrl: './templates/form-logic.html',
controller: function ($scope, formService){
}
});
service.js
angular.module('formService',[])
.service('FormService', function($http){
});
But I got this error: Error: $injector:unpr Unknown Provider
Thanks for your help!