Last Updated: February 25, 2016
·
412
· AvetisG

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.

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