call service from diffrenent component to display a message : I have a a shared comPonent alert wHich display different alerts (error, success..) that uses a service alertService.
and I have diffeent component that uses the alertServices.
the alert component is called in the appComponent
<app-alert></app-alert>
when I call the service from another component the alert don't displayed it displyaed only when I call <app-alert></app-alert> in the component that call the service.