84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
如下,我想把item对象的属性转移到quotation...
$scope.quotation = {}; $scope.save = function(item) { for ( var key in item) { console.log($scope.quotation); } }
For direct useangular.copy(source, [destination]);对比你的例子就是angular.copy(item, $scope. quotation); you can see here.
angular.copy(source, [destination]);
angular.copy(item, $scope. quotation);
angular.extend or angular.copy
For direct use
angular.copy(source, [destination]);
对比你的例子就是angular.copy(item, $scope. quotation);
you can see here.angular.extend
or
angular.copy