I have a service:
angular.module('USC').service('TemplateService', function() {});
What I would like to use before manually loading an Angular project:
angular.bootstrap(document, ['USC']);
Is it possible? I know that I can call var service = angular.bootstrap (). Get (); for Angular services, but how would I call a custom option before the module was initialized?
If it's ok to have a different service instance than the one that will be used by the application itself, you can achieve what you want:
angular.injector(['ng', 'yourApp']).get('SomeService').doStuff();
. .< > , ( 0) Angular. >
Source: https://habr.com/ru/post/1541163/More articles:Binary output Neural network in Python Theano - pythonmysqldump: received error: 1045 Access denied - mysqlHow does this workaround algorithm work? - javaHow to use polygon in snap.svg - htmlConfiguring cover.py with a bulb - pythonCorrect word splitting with apostrophes in Solr - luceneКак передать gulp.watch() в канал? - javascriptDrupal 7: добавить элемент в панель инструментов/меню администратора программно - drupalFilter pandas data frame by list of ids - pythonConditional deep link or URL in email - urlAll Articles