K
K
Konstantin2021-03-05 02:31:11
Angular
Konstantin, 2021-03-05 02:31:11

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

1 answer(s)
A
Anton Shvets, 2021-03-05
@Junart1

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 question

Ask a Question

731 491 924 answers to any question