title: How can I do a editable table in AngularJS?
body: <p>I have created a table using ngTable and all good until I want to be able to edit it. </p>
  
  <p>I have the buttons to edit, to erase and to add but it does not work. No mistake gives me the console. I have copied the example of the API, maybe it is it for what does not work well because I have not could implement it to my code. It is grateful if you put some different example. </p>
  
  <pre><code>// SORT TABLE --&gt;
          function refresh(){
              vm.tableParams = new ngTableParams({
                  page: 1,            
                  count: 10,
                  filter: {
                      id: '',
                      curso: '',
                      precio: '',
                      new: '',
                      url_curso: ''
                  },
                  sorting: {
                      id: 'asc'     
                    }
                },{
                    data: vm.datos
                    }
                );
          }
    //EDIT TABLE
  
          vm.checkId = function(data, id){
              if (id === 2 &amp;&amp; data !== 'awesome'){
                  return '';
              }
          };
  
          vm.saveUser = function(data, id){
              angular.extend(data, {id:id});
              console.log('Saving user: '+id)
          };
  
          vm.removeUser = function(index){
              vm.test.splice(index,1);
          };
  
          vm.addUser = function(){
              vm.inserted ={
                  id: vm.datos.length+1,
                  curso: '',
                  precio: null,
                  url_curso: '',
                  new: true
              };
              vm.datos.push(vm.inserted);
          };
      };
  })();
  </code></pre>