title: Angular 8 ng-bootstrap 5 table sorting not working
body: <p>I have a project which is using .NET Core 3.1 and Angular 8 (<code>"@angular/core": "8.2.12"</code>).<br/>
  The part of getting and subscribing data from Web API is working well.<br/>
  Now I am trying to perform a sortable, pagination, and filtering table, so I find <a href="https://ng-bootstrap.github.io/#/components/table/examples#complete" rel="nofollow noreferrer">ng-bootstrap</a> and the <a href="https://stackblitz.com/edit/ngbootstrap-table?file=app/app.module.ts" rel="nofollow noreferrer">working code</a> from <a href="https://stackoverflow.com/questions/54700298/how-to-implement-ng-bootstrap-4-table-sorting-pagination-and-filtering/54707792">this question</a>.</p>
  
  <p>Following the setup, I run the install cmd in PowerShell:</p>
  
  <pre><code>ng add @ng-bootstrap/ng-bootstrap@5.3.1
  </code></pre>
  
  <p>add this to my app.module.ts:</p>
  
  <pre><code>import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
  @NgModule({
    imports: [
      NgbModule
    ]
  </code></pre>
  
  <p>and then I tried to follow the working code to add sort function to my table, but I can't click the header to sort the data.<br/></p>
  
  <p>so I copied these files from the working code to my project:</p>
  
  <ul>
  <li>countries.ts</li>
  <li>country.service.ts</li>
  <li>country.ts</li>
  <li>sortable.directive.ts</li>
  <li>table-complete.html</li>
  <li>table-complete.ts</li>
  </ul>
  
  <p>and set route and declarations for table-complete.html page in my app.module.ts:</p>
  
  <pre><code>@NgModule({
    declarations: [
      NgbdTableComponent
    ],
    providers: [AppComponent, NgbdTableComponent, NgbdSortableHeader]
  </code></pre>
  
  <p>(I change the class name from NgbdTableComplete to NgbdTableComponent)</p>
  
  <p><br/>Here is the screenshot:
  <a href="https://i.stack.imgur.com/3bcDi.png" rel="nofollow noreferrer">The pagination and filtering functions are working well.</a>
  <br/><br/>
  But I still cannot click the table header to sort the table.<br/>
  Did I miss something during the process? </p>