'How to detect change when the value are the same using valueChanges

this
  .form
  .get('some_value')  
  .valueChanges
  .subscribe(result => {
    if(result === 'show-modal'){
      this.openModal = true;
    }
  });

Is it possible to detect change when the value is the same using valueChanges? When the value of the form.get('some_value').value equals to show-modal I need to show the modal. The problem is that the modal isn't triggering when the value is the same. Is there a way to do it with valueChanges?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source