I have a custom module in my angular 5 project. Custom module name:- Restaurant
This custom module has 5 components. They are:- a. Banner b. Menu c. Recommend d. Basket e.Restaurantlayout
Restaurantlayout is having all those four (Banner,Menu,Recommend,Basket) components and in Restaurant module route I am loading Restaurantlayout.
Until this point working fine.
I want when this module will be loaded then a variable will have some data by calling a service and that data will be available for each of the component. I have tried by doing @input() but it is not working in the custom module, but works great for app module.
How can I achieve this? Thanks in advance.