I have a select box where I need to watch for changes so I can dynamically change the value of my second select box.
<select ng-model="$ctrl.primaryValue"
ng-options="key as value for (key, value) in $ctrl.primaryOptions">
</select>
<br /><br />
<select ng-model="$ctrl.secondaryValue"
ng-options="key as value for (key, value) in $ctrl.secondaryOptions">
</select>
How would I best watch $ctrl.primaryValue and according to that load in other $ctrl.secondaryOptions.
$watch, you're definitely using Angular 1 - that service doesn't exist at all in Angular 2! See the answers to stackoverflow.com/questions/34569094/… for more information on what$watchhas been replaced with. Sorry for the drive-by edit, should have left you some more info!