I am using angular 6. I want to send data (which I am getting from external API) from app.component to other (child) components, I do not want to call that common API/Service in all components separately and repetitively. I want to call it once, so that's why I am calling in app.component.ts
Here is a service/API code
this.mainService.getBaseModel().subscribe(ret => {
this.basemodel = ret;
}, error => { }, () => {
});
I want to send this 'basemodel' value across all components in my app. Help me to resolve and understand it better. Thank you.