arrow_back Back to Notebook
angular/angularjs
angular/angularjs
February 2, 2019

The difference between services and providers in AngularJS

An easy way to remember it is that Providers are at config time (before the application has finished loading).

Services are while the application is running.

Example Service and Provider init

angular.module('moduleName', [])
       .config((injectables) => { // provider & constants
           // do configuration
       })
       .run((injectables) => { // services & constants
           // do initialization
       });

Thanks for reading!

John Wiseman

Full-Stack Software Engineer building scalable digital solutions. specializing in modern web technologies and mission-critical systems.

© 2026 Wiseman Systems Pty. Ltd.

Navigation

Start a Conversation

Ready to discuss your next project? Let's build something extraordinary together.

Get in Touch