I have this piece of code
if ($scope.newLeverAdded) {
console.log("executed this");
console.log($scope.tradeDataObj, "data is here");
console.log($scope.group_levers, "this 2 here");
$scope.group_levers.levers.push.apply($scope.group_levers.levers, $scope.tradeDataObj.levers[0]);
console.log($scope.group_levers, "mid prrinting");
console.log("after this");
}
console.log($scope.group_levers, "final prrinting");
All i am trying is to increase my Array size by adding new element to it.. SO that now the array contains 2 element. But the final console still returns a single element in array.
Why is it so?