angularjsng-grid

Clear data from an ng-grid


I have two ng-grids on a page, a textbox, an add button and an apply button. When the page loads, options fill the first ng-grid. The second grid remains empty. The user clicks an option from the first grid, enters info into the text box and then clicks the add button. The info the user enters is then displayed in the second grid. When the user clicks apply the info is saved in the db. When the user clicks another option in the first grid I need the info that was previously entered to be cleared. Anyone know how this can be done?


Solution

  • You should just be able to assign [] to the variable in your model that the grid is bound to.