I am developing a custom AngularJS application that needs to handle and store all the checkbox selections made by the user in a simple array of IDs. The functionality includes displaying a modal when the open button is clicked, allowing the user to perform certain actions. However, I encountered an issue where upon closing the modal, the array containing the IDs gets reset, requiring the user to reselect the checkboxes to save the IDs again.
Below is a snippet of my code: App.js
app.controller("requestsCtrl",["$scope", "$rootScope", "crud", function($scope, $rootScope, crud){
$scope.selectedItemsId = [];
$scope.checkedAllActive = false;
// Other controller logic here...
}]);
// Other Angular directives and services are defined here....
Index.jade
script(type="text/ng-template" id="requests.html")
<!-- Template content for requests -->