Hi I'm trying to copy a scope value from one to another scope. For example:
var items=$scope.order.invoicewindow.items;
$scope.order.orderwindow.items=items;
However right both scopes are pointing to each other. So if I change $scope.order.orderwindow = "abc", $scope.order.invoicewindow.items also becomes "abc" (which I don't want. I only want $scope.order.orderwindow = "abc").
Thanks
You can use angular.copy(source, [destination]);
var items= "YourValue";
angular.copy(items, $scope.order.invoicewindow.items);
$scope.order.invoicewindow.items = angular.copy(items); //Or You can also use this style