【发布时间】:2018-10-03 10:19:39
【问题描述】:
我正在深入观察 Angular 中的一个对象,
$scope.$watch('bigObject', function(newVal, oldVal, scope) { //Watch the whole object
console.log("The key that changed was: " + key);
}, true); //Deep watch
如何获取已更改的密钥?
示例输出:The key that changed was: bigObject.users.john.birthday
【问题讨论】: