jquery - A bug occurs when setting a radio button prop('checked','true') in angulajs and then selecting another button
天蓬老师
天蓬老师 2017-05-15 16:50:24
0
1
701

Why is it that when you set a radio button prop('checked','true') in Angulajs and then select another button, the ng-model of the button has not changed, so it cannot be monitored? ? ?

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
迷茫

After an afternoon of brain-dead work, I finally found out why I still need to use jquery to operate the dom when I can directly use ng-model to control it. This can only show that my IQ was infinite at the time~~~Also, I can’t Because the monitoring is performed in the child scope, the object ng-model='object.xx' must be used instead of ng-model='xx'. Otherwise, changes in the child scope cannot change the parent scope. In fact, it is recreated. A value, which is related to the prototype chain of javascript. It’s just my fault that I didn’t see it clearly. It was all tears!

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template