I’m an Italian web and mobile engineer. I have a passion for creating and enhancing anything technology related. When it comes to building, my ultimate goal is to make the world a better place.
Location
Chiasso, Switzerland
Education
DEGREE IN COMPUTER SCIENCE ENGINEERING
Work
Entrepreneur, Senior Front End Developer, Blogger, Speaker at Dreaming Lab Sagl
Well, I would say that it depends on the component.
For example, if you need the Alert Component in the whole application, I'd add it to the App module.
What do you think?
I’m not sure it would be accessible in feature modules as you need to declare it in their module. In order to avoid that error that you cannot declare the same component in more than one module, I’d use a shared module.
I’m an Italian web and mobile engineer. I have a passion for creating and enhancing anything technology related. When it comes to building, my ultimate goal is to make the world a better place.
Location
Chiasso, Switzerland
Education
DEGREE IN COMPUTER SCIENCE ENGINEERING
Work
Entrepreneur, Senior Front End Developer, Blogger, Speaker at Dreaming Lab Sagl
Thank you for the article!
Referring to #5, wouldn’t it be more recommended to put your component in the shared module?
Well, I would say that it depends on the component.
For example, if you need the Alert Component in the whole application, I'd add it to the App module.
What do you think?
I’m not sure it would be accessible in feature modules as you need to declare it in their module. In order to avoid that error that you cannot declare the same component in more than one module, I’d use a shared module.
Yes you're right.
As I said before it depends on the context.
The best suggestion is to declare a module once.