Skip to content

Instantly share code, notes, and snippets.

@haraldfianbakken
Last active August 29, 2015 13:58
Show Gist options
  • Save haraldfianbakken/10357727 to your computer and use it in GitHub Desktop.
Save haraldfianbakken/10357727 to your computer and use it in GitHub Desktop.
transition-workaround
$scope.removeInsuranceCard = function(card){
var confirmed = confirm('Do you want to remove this item?');
if(confirmed){
$log.debug("Removing item @"+$scope.data.selectedIndex);
$scope.data.items.splice($scope.data.selectedIndex,1);
$scope.selectedItem = $scope.data.items[$scope.data.selectedIndex];
$stateParams.index = $scope.data.selectedIndex;
// Force GUI TO be updated when removing the item bug in the carousel
$state.transitionTo($state.current, $stateParams, {
reload: true,
inherit: true,
notify: true
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment