I think I'm doing bad practice, so I would like you to guide me please.
I have a variable in a provider.
@Injectable()
export class SharedService {
public mynumberservice:any=0;
and in two components: MainComponent
and MenuComponent
t I modify the value of this variable with a setTimeout, this is the best way?
this.SharedService.mynumberservice=2;
Thanks
https://stackblitz.com/edit/angular-nmmbi4?file=app/main.component.ts