M
M
Michail2019-08-15 22:06:26
Angular
Michail, 2019-08-15 22:06:26

How to replace a component in declaration?

How can I replace a component in a declaration? That is, to determine dynamically which component will be determined and whether it is generally possible to somehow dynamically determine which component will be used before assembly or during assembly.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michail, 2019-08-16
@Michail_04

import loads files asynchronously, import AppModule fires before we modify the map, so old values ​​are declared in modules. You need to wait until the custom components are loaded and only then mess up the app module.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question