C
C
Coder3212016-11-21 15:16:33
Angular
Coder321, 2016-11-21 15:16:33

Angular 2 how to connect module globally?

I have a module with components that I export from it. Is there any way to connect this module globally. that is, what would the components from it be available in all application modules?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Ruslan Lopatin, 2016-11-21
@lorus

To do this, the Angular 2 style guide recommends making a SharedModule and connecting (that is, importing and exporting) modules and components used globally to it. And already SharedModule to connect to all other modules. Beware of circular dependencies

I
iBird Rose, 2016-11-21
@iiiBird

What do you mean by "globally"? import still needs to be specified. because that's how Angular works. it can't even find Component until you specify @angular/core

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question