Created
February 9, 2017 01:00
-
-
Save haynesgt/265c36e095932222d6ae804405de6ccd to your computer and use it in GitHub Desktop.
Anguler 1.5.9, bridge dependency's provider with app provider
This file contains 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
angular.module('registrations', []) | |
.provider('registrations', function() { | |
console.log('New registrationsProvider'); | |
this.$get = function() { | |
console.log('Get registrations'); | |
}; | |
}); | |
angular.module('app', ['registrations']) | |
.provider('myRegistrations', function() { | |
console.log('New myRegistrationsProvider'); | |
this.$get = function(registrations) { | |
console.log('Get myRegistrations'); | |
}; | |
}).config(function(registrationsProvider, myRegistrationsProvider) { | |
console.log('Config app with registrationsProvider and ' + | |
'myRegistrationsProvider'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment