Use Services instead of Controllers in AngularJS to modularize your code
Instead of creating a ton of controllers to modularize your code go ahead separate it between services. This way you also don't have to create many divs on the HTML side which keeps your view cleaner.
Written by Avetis Ghukasyan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Did you know?
AngularJS pages are long-lived browser apps with the same script risk as a newer single-page app. Third-party code in the template can read forms and values rendered on the page.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#