angularjs watchGroup
angularjs 1.3 中加入了 watchGroup,更方便做 select 联动
var watchGroup = $scope.$watchGroup(['terminalCity', 'terminal'], function(newValues, oldValues, scope) {
// newValues[0] -> $scope.terminalCity
// and
// newValues[1] -> $scope.terminal
});
猜你喜欢
转载自starxf.iteye.com/blog/2338099
今日推荐
周排行