ng-change get new value and original value

前端 未结 7 892
北荒
北荒 2020-11-28 22:20

I\'m using ng-options to select values from a pulldown. I\'d like to be able to compare the old value to the new value. ng-change works well for grabbing the new value of th

7条回答
  •  北海茫月
    2020-11-28 22:44

    You can use something like ng-change=someMethod({{user.id}}). By keeping your value in side {{expression}} it will evaluate expression in-line and gives you current value(value before ng-change method is called).

    
                            
        
    提交评论

提交回复
热议问题