NgModel Java script

How to mark that the element has changed so that the ng-model directive works. I fill in a text field with a value coming from an API but in the other select field some options only appear depending on the value of that text field I use ng-if but as the field is not changed via user interaction the value of ng-model it is always empty. I’m doing this in javascript