New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add provider.$decorator to angular.Module #11300

wants to merge 5 commits into
base: master
Jump to file or symbol
Failed to load files and symbols.
+12 −0
Diff settings


Just for now


Add provider.$decorator to angular.Module

Allow for decorators to be added prior to the angular.config process.

Use case: I am working on a project using ui.router and would like to modify the $stateProvide.state service and would like to ensure that my modification will always be applied prior to any angular.config blocks which could contain $stateProvide.state requests.

This would also allow any decorators to be clearly delineated in your code and not lost in a config block.
  • Loading branch information...
RodneyEbanks committed Mar 11, 2015
commit e7ac65bb393b818399245f68fb0b562740f10ade
@@ -192,6 +192,18 @@ function setupModuleLoader(window) {
* See {@link auto.$provide#constant $provide.constant()}.
constant: invokeLater('$provide', 'constant', 'unshift'),
* @ngdoc method
* @name angular.Module#decorator
* @module ng
* @param {string} name service name
* @param {Function} providerType Construction function for creating new instance of the
* service.
* @description
* See {@link auto.$provide#decorator $provide.decorator()}.
decorator: invokeLater('$provide', 'decorator'),
* @ngdoc method
ProTip! Use n and p to navigate between commits in a pull request.