那就在controller里写你的逻辑好了,a情况就设置$scope.student.num = 30;b情况同理,angular数据双向绑定,你改变ctrl里的$scope.student.num,前台ng-model绑定的也会随之改变的。