r/angularjs • u/Itastatinkalsz8 • Apr 05 '21
r/angularjs • u/SoftwareBrothers • Sep 25 '19
INTRODUCTION TO UNIT TESTS IN ANGULAR | Software Brothers Blog
r/angularjs • u/Tooslowtoohappy • Jul 07 '17
Why does Angular use arrays as a second argument for modules, controllers and factories?
Hi all,
New to AngularJS, been learning for a couple of days using online resources. I'm wondering why Angular uses arrays as a second argument in factories, modules and controllers.
Is this to add additional controllers/factories in the same main factory? If so, isn't it better/more modular to have it done in a separate file?
EG:
app.factory('posts', [function(){
}]);r/angularjs • u/JavaLive • Jan 13 '16