Artificial intelligent assistant

AngularJSにて、変数に$scopeを代入した際の質問 app.controller("test", function($scope){ var options = $scope.nav.getCurrentPage().options; $scope.item = options.item; // {str:'test',int:'000000'} $scope.click = function() { var data = $scope.item; console.log($scope.item.int); // 000000 data.int = "123456"; console.log($scope.item.int); // 123456 data$scopedata$scope

JavaScript
`data``$scope.nav.getCurrentPage().options.item`

`angular.copy()`


var data = angular.copy($scope.item);

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy fb6187c6ae4636376ea6231d8d8461c0