Created
September 4, 2014 14:09
-
-
Save mikemclin/566be14dc2feba445258 to your computer and use it in GitHub Desktop.
Add late dependency to Angular module that has already been created
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Module `myApp` is already created. We were unaware that we needed | |
// the `anotherModuleDependency` module when we created `myApp`. The | |
// below code allows us to add `anotherModuleDependency` to the | |
// `myApp` dependency list. | |
angular.module('myApp').requires.push.apply( | |
angular.module('myApp').requires, ['anotherModuleDependency'] | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment