S
S
Sashqa2019-09-16 10:31:20
Angular
Sashqa, 2019-09-16 10:31:20

How to import a module correctly?

There are ui components, I export them in a moduleUiModule

const components = [
    // компоненты
]
 exports: [
    ...components,
],
declarations: components

UiModuleI want to import the module itself into CoreModule
And already connect it everywhere CoreModule, I did it, but now the error asks to connect it everywhere UiModule
How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2019-09-16
@Sashqa

@NgModule({
  exports: [
    UiModule
  ],
})
export class CoreModule { }

It is not necessary to import, it is only necessary if something from the UiModule is used in the CoreModule itself

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question