[AngularJS] Single or Multiple Service & Controller
Hi Guys,
I just want to know your insight about, is it good to put all functions and methods in a single controller and service of all my website modules or it is better to create one module equals to one controller and service using AngularJS.
Thank you
Re: [AngularJS] Single or Multiple Service & Controller
Hello,@FunkySloth
Please try this code,To Single or Multiple Service & Controller
Code:
angular.module('myModule', [])
.controller('MyController', [
'Service1', 'Service2', 'Service3',
function( Service1, Service2, Service3 ) {
...
}
]);
I hope this code will be useful for you.
Thank you.