I want to assign some values when a button click event happens via event parameter:
$scope.update = function(context) {
$scope.master = context;
};
I have assigned user
values to $scope.master
.
Now i am seeing angular.copy(). So I wrote the code with angular.copy.
$scope.update = function(context) {
$scope.master = angular.copy(context)
};
Both are doing same, so what is the difference? Please tell me about the difference between angular.copy()
and equal(=)
.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…