Answer the question
In order to leave comments, you need to log in
Is it possible to directly initialize a service?
After successful compilation, Angular creates an index.html page with included js files. And for the application to work, you need to place the component tag.
In turn, the component can initialize some service.
Is it possible to directly initialize a service? Without inserting a component tag? For example, passing parameters from the user side to the service?
If you use the Angular Elements approach, then the entry point is still a component.
Who and how embeds ready-made angular applications into other web pages, with the possibility of configuration. For example, hide some of the components from the application.
Answer the question
In order to leave comments, you need to log in
Why in the service then, store the config somewhere in the global, and Angular will read it at startup.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question