Hi there,
I have a grid row that uses ng-repeat to populate from some server code to the database.
When I select a day from the drop down list, it selects the tasks for that day from the database and lists them in a series of rows.
However, if I select the first day and it has 9 tasks and then I select the second day and it only has 5 tasks for example, the last 4 tasks of the first day still remain on the page. I can clear the $scope model every time I call it which does remove the tasks, but it still leaves the grid rows.
How can I ensure that every time I call the server code, the grid rows are removed as well? I don't want to refresh the whole page, just clear the rows?
Cheers
Mike
-
Hello Mike, you need set the empty array to that variable.
Like you use the variable "myArray" in the ng-repeat attribute, you need to clear it with teh code below:
$scope.myArray = [];
-
-
Hi there,
Yes, I already did that thank you. However, it does clear the scope variable, but the empty grid row then just remains on the page. Is there any way to get rid of that without reloading the whole page?
Regards
Mike -
-
Could you show us how exactly you build that grid, what code do you use there, what ng-repeat property is used?
-
-
-
-
Please remove the array item instead of clearing it. Please see here how to do it: https://developer.mozilla.org/en-US/d...
-
-
-
-
Please share (https://docs.appery.io/docs/teams-sha...) your app with support@appery.io and provide us with the following information:
1) App name
2) Test credentials if login functionality is implemented in your app
3) Detailed steps to reproduce the issue -