Currently, I am utilizing NGTable to exhibit data on my webpage. The data is stored in an array and passed through the dataset parameter. However, when I dynamically modify a value in the array, the changes are accurately reflected in the table BUT if I navigate to the second page and return to the first page, the table displays the old data.
For further clarification, here is a JSFiddle demonstrating this issue: http://jsfiddle.net/vqxscmsu/
angular.module("uCloud", ["ngTable"])
.controller("myController", myController);
myController.$inject = ["NgTableParams", "$scope"];
function myController(NgTableParams, $scope) {
$scope.fsck = [{
name: "teste1",
description: "testando1"
}, {
name: "teste2",
description: "testando2"
}, {
name: "teste3",
description: "testando3"
}, {
name: "teste4",
description: "testando4"
}, {
name: "teste2",
description: "testando2"
}, {
name: "teste3",
description: "testando3"
}, {
name: "teste4",
description: "testando4"
}, {
name: "teste2",
description: "testando2"
}, {
name: "teste3",
description: "testando3"
}, {
name: "teste4",
description: "testando4"
}, {
name: "teste2",
description: "testando2"
}, {
name: "teste3",
description: "testando3"
}, {
name: "teste4",
description: "testando4"
}, {
name: "teste2",
description: "testando2"
}, {
name: "teste3",
description: "testando3"
}, {
name: "teste4",
description: "testando4"
}]
this.tableParams = {
TodoGeneral: null
};
this.tableParams['TodoGeneral'] = new NgTableParams({}, {
dataset: $scope.fsck,
});
$scope.test = function() {
$scope.fsck[0].name = "mais non";
}
}