I'm relatively new to angularjs. I'm using node.js and angular.js
I've 5 services(which fetch data from node server) - services.js (angular service) Inside my controller.js file I've 20 controllers. In 15 controllers I make use of the same 5 services and some repeat functions(to get data from view/user submission). In each controller, there is only 1 service which is specific to the controller, all other code is just repeat of same stuffs in all other controllers. Everything is working great. But the problem is, the code is growing bigger and it feels like am doing something wrong as there is a lot of repeated code. *My question is:* Can I take out the repeated stuffs, put it somewhere like a function and call it inside each controller, in 1 line? I know, I can't make it a function - I dint get a better way to explain it, so putting it that way, so that you people can understand what I'm looking for. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
