# Is it possible to subscribe to a local variable in a Angular component?

I’m using Angular 8, and I’m newbie.

I need to listen to a variabel. When it’s have 0 value, the view show loader animation (loader css). And when it is already populated, it show the data.

I’m doing this way

this.data.subscribe(...)


and it shows error.

Is that any possible way to do this things ?

Source: New feed
Source Url Is it possible to subscribe to a local variable in a Angular component?