Possible to use a custom Angular service before bootstrap?
问题 I have a service: angular.module('USC').service('TemplateService', function() {}); That I would like to use before I manually bootstrap my Angular project: angular.bootstrap(document, ['USC']); Is this possible? I know I can call var service = angular.bootstrap().get(); for Angular provided services, but how would I call a custom one before the module was initialized? 回答1: If it is OK to have a different instance of the service than the one that will be used by the app itself, you can achieve