I have two $scope array inside my controller.
$scope.arrayA= [false, false, false, false, false, false];
$scope.arrayB= [false, false, false, false, false, false];
arrayA will change depends on checkbox click. I have done this part.
arrayB will change values to be equal to arrayA only when a button is clicked.
<button type="button" ng-click="arrayB = arrayA" class="btn btn-search">Get Data</button>
The problem is once the button is clicked, two way data binding is implemented. arrayB will change everytime arrayA changes.
I only want arrayB to change when the button is clicked. Is there a way to use the angular one-way data binding @
inside ng-click? You know like how we pass variables values in python as varB = varA
.