I want to extend one filter function which used to enable/disable
a button.
I have an array and am receiving a variable (serviceVariable)
from a service. I am looping through this array to check whether this service value is available or not. if match, then filter function should return true to disable a button.
But service takes some time to update this serviceVariable
, so on page load it is not matching with any of array variables. but after few seconds am receiving the serviceVariable
with value.
can we use watch here? so that when my serviceVariable
get update, I can check with new value.
or any other way?