#watchCollection

angular之$watch() $watchGroup()和$watchCollection()

$watch$watch主要是用来监听一个对象,在对象发生变化时触发某个事件。 用法:$scope.$watch(watchFn,watchAction,deepWatch)接下来讲一下这几个参数: 参数说明watchFnangular表达式或函数的字符串watchAction(newValue,o...