title: Primeng Editable Rows - NullInjectorError: No provider for EditableRow
body: <p>I have a working primeng table that I wanted to make the rows editable for and followed <a href="https://www.primefaces.org/primeng/#/table/edit" rel="nofollow noreferrer">their documentation to do so.</a> But it throws me the following error when it tries to load</p>
  
  <p><code>NullInjectorError: No provider for EditableRow</code></p>
  
  <p>My p-table definition has the following</p>
  
  <pre><code>&lt;p-table
        [columns]="selectedColumns"
        [value]="tableData"
        [resizableColumns]="true"
        [reorderableColumns]="true"
        [paginator]="true"
        [rows]="10"
        [rowsPerPageOptions]="[5, 10, 25, 50, 100]"
        editMode="row"
  &gt;
  </code></pre>
  
  <p>and since I'm loading in different cases of dynamic data my row definition is (it's a lot but mostly just copy/paste from their template):</p>
  
  <pre><code>      &lt;ng-template *ngIf="canEdit" pTemplate="body" let-rowData let-editing="editing" let-ri="rowIndex"&gt;
          &lt;tr [pEditableRow]="rowData"&gt;
            &lt;ng-container *ngFor="let col of selectedColumns"&gt;
              &lt;td&gt;
                &lt;p-cellEditor&gt;
                  &lt;ng-template pTemplate="input"&gt;
                    &lt;input pInputText type="text" [(ngModel)]="rowData[col.field]" required /&gt;
                  &lt;/ng-template&gt;
                  &lt;ng-template pTemplate="output"&gt;
                    {{ rowData[col.field] }}
                  &lt;/ng-template&gt;
                &lt;/p-cellEditor&gt;
              &lt;/td&gt;
            &lt;/ng-container&gt;
          &lt;/tr&gt;
          &lt;td style="text-align:center"&gt;
            &lt;button
              *ngIf="!editing"
              pButton
              type="button"
              pInitEditableRow
              (click)="onRowEditInit(rowData)"
            &gt;edit&lt;/button&gt;
            &lt;button
              *ngIf="editing"
              pButton
              type="button"
              pSaveEditableRow
              style="margin-right: .5em"
              (click)="onRowEditSave(rowData)"
            &gt;save&lt;/button&gt;
            &lt;button
              *ngIf="editing"
              pButton
              type="button"
              pCancelEditableRow
              (click)="onRowEditCancel(rowData, ri)"
            &gt;cancel&lt;/button&gt;
  </code></pre>
  
  <p>But it doesn't like the pInitEditableRow / pSaveEditableRow / pCancelEditableRow</p>
  
  <p>As that's what the errors complain about.
  I have the Table imported in my app modules and none of the examples have anything else brought in so I'm not sure why it's saying there is no provider for the EditableRow. </p>