for (var key in $scope.searchModule) {
if ($scope.searchModule[key] === '') {
delete $scope.searchModule[key];
}
}
像上面的代码会破坏这种双向绑定,尽量避免这样写
for (var key in $scope.searchModule) {
if ($scope.searchModule[key] === '') {
delete $scope.searchModule[key];
}
}
像上面的代码会破坏这种双向绑定,尽量避免这样写