I made a keyPad popUp that change values in some variables in the scope. I want to revert any change made to those variables but when the popUp close, the changes are not made to those values that appear on the current view without refreshing the view.
Changing the values part in the popUp works flawlessly and in real time.
I tried to put the root of those variables in a temporary variable and the make the switch when the user cancel. To scope values are reverted, but the view is not updated.
var inventoryLineTemp = $scope.inventoryLine;
var updateQuantityPopup = $ionicPopup.show({
templateUrl: 'templates/popUps/quantityPopUp.html',
title: "Quantité",
scope: $scope,
buttons: [
{ text: 'Cancel',
onTap: function(e) {
$scope.inventoryLine = inventoryLineTemp;
}
}...