Dependency injection is a design pattern used in AngularJS to make components loosely coupled by providing them with the necessary dependencies from an external source.