1、监听一个一个变量的值的变化
...$scope.storeIns = null; //storeIns定义在$scope下...$scope.$watch('storeIns', (n, o) => { //storeIns为变量名称 n为变化后的值;o为变化前的值 //todo something })
2、监听多个变量的值
$scope.$watchGroup(['createDate','source'],function(n,o){ //... });