Edit: two scenarios 1) client verification (original message) 2) server verification (advanced based on comments)
1) check on client
. ,
: angular.equals() : / ( ). script ():
function Controller($scope) {
$scope.master = {};
$scope.update = function(user) {
$scope.master = angular.copy(user);
};
$scope.reset = function() {
$scope.user = angular.copy($scope.master);
};
$scope.isUnchanged = function(user) {
return angular.equals(user, $scope.master);
};
}
, , - , . ( ). isUchnaged , angular.equals()
Angular
. angular.copy(). , lo-dash . DeepClone()
2)
, ( ) , . , , - else "".
, . , / , "". MS SQL Server rowversion, .
, sucesfull UPDATE, , , ... .
:
:
- Client (current) Version
- .
NHiberante ( )