E
E
Evgeny2018-12-25 17:58:32
Angular
Evgeny, 2018-12-25 17:58:32

How can you test the dynamic creation of components?

I want to test a module that uses dynamic creation of components . I
write:

TestBed.configureTestingModule({
    ...
    entryComponents: [
        TestComponent,
    ],
})

However, the error
Error: No component factory found for TestComponent is thrown. Did you add it to @NgModule.entryComponents?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question